Re: Removing all instances of "NOT NULL" from an entire directory of files
Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
From: Jesus Aneiros <aneiros@jagua.cfg.sld.cu>
To: Dan Browning <danb@cyclonecomputers.com>
Cc: redhat-list@redhat.com, pgsql-novice@postgresql.org, interchange-users@minivend.com
Date: 2000-09-12T02:08:59Z
Lists: pgsql-novice
On Mon, 11 Sep 2000, Dan Browning wrote: > cat filename | perl -pi -e "s/NOT NULL//g" > filename > > But how do I run that command on every file in a directory, successively? perl -i -pe 's/NOT NULL//g' * The -i is doing the replacement in place so the pipe and redirection are not necesary unless you want to keep the orginals, then you could use -ibak -- Jesus Aneiros Sosa mailto:aneiros@jagua.cfg.sld.cu http://jagua.cfg.sld.cu/~aneiros