Re: Removing all instances of "NOT NULL" from an entire directory of files - Mailing list pgsql-novice

From Jesus Aneiros
Subject Re: Removing all instances of "NOT NULL" from an entire directory of files
Date
Msg-id Pine.LNX.4.10.10009112202270.8252-100000@jagua.cfg.sld.cu
Whole thread Raw
In response to Removing all instances of "NOT NULL" from an entire directory of files  ("Dan Browning" <danb@cyclonecomputers.com>)
List 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


pgsql-novice by date:

Previous
From: Claus Houmøller
Date:
Subject: Re: inserting a file into a database.
Next
From: claus@virtualhost.dk
Date:
Subject: Fwd: Re: inserting a file into a database.