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

Поиск
Список
Период
Сортировка
От Jesus Aneiros
Тема Re: Removing all instances of "NOT NULL" from an entire directory of files
Дата
Msg-id Pine.LNX.4.10.10009112202270.8252-100000@jagua.cfg.sld.cu
обсуждение исходный текст
Ответ на Removing all instances of "NOT NULL" from an entire directory of files  ("Dan Browning" <danb@cyclonecomputers.com>)
Список 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 по дате отправления:

Предыдущее
От: Claus Houmøller
Дата:
Сообщение: Re: inserting a file into a database.
Следующее
От: claus@virtualhost.dk
Дата:
Сообщение: Fwd: Re: inserting a file into a database.