Removing all instances of "NOT NULL" from an entire directory of files

From: "Dan Browning" <danb(at)cyclonecomputers(dot)com>
To: <redhat-list(at)redhat(dot)com>, <pgsql-novice(at)postgresql(dot)org>, <interchange-users(at)minivend(dot)com>
Subject: Removing all instances of "NOT NULL" from an entire directory of files
Date: 2000-09-11 23:34:52
Message-ID: 002201c01c48$e2af3490$1500000a@danb
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

OK, I've got a command (or two) that will remove all NOT NULL strings from a
given file.

cat filename | perl -pi -e "s/NOT NULL//g" > filename

But how do I run that command on every file in a directory, successively?

(In case you're wondering, I'm working on the pgsql/ directory of .sql files
that interchange uses to build the database tables).

Thanks,

Dan Browning
Network & Database Administrator
Cyclone Computer Systems

Responses

Browse pgsql-novice by date

  From Date Subject
Next Message Michael R. Jinks 2000-09-12 00:04:49 Re: Removing all instances of "NOT NULL" from an entire directory of files
Previous Message Sykora, Dale 2000-09-11 22:18:17 RE: Change varchar lenght