[ic] Re: [NOVICE] Removing all instances of "NOT NULL" from an entire
directory of files
Jesus Aneiros
aneiros@jagua.cfg.sld.cu
Mon, 11 Sep 2000 22:08:59 -0400 (EDT)
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