Re: cat infile | translate all occurences of "NOT NULL" to ""

Поиск
Список
Период
Сортировка
От Jochen Weyermanns
Тема Re: cat infile | translate all occurences of "NOT NULL" to ""
Дата
Msg-id C1256957.00516366.00@kisters-ac1.kisters.de
обсуждение исходный текст
Список pgsql-novice

Hi Dan

>  what command do I use to substitute all occurences of a certain string (say,
>  "NOT NULL") with another arbitrary string, (e.g. "")?  I've tried grep and
>  tr, but can't figure it out.

if substitution in 'vi' is not possible due to the size of the file try the
stream editor 'sed'
e.g.:
     sed /"NOT NULL"/s/"NOT NULL"/""/ filename > filename2
(I am not sure, if   ... filename > filename is appropriate)

Jochen



В списке pgsql-novice по дате отправления:

Предыдущее
От: "Tamsin"
Дата:
Сообщение: RE: cat infile | translate all occurences of "NOT NULL" to ""
Следующее
От: The Hermit Hacker
Дата:
Сообщение: RE: cat infile | translate all occurences of "NOT NULL" to ""