Re: cat infile | translate all occurences of "NOT NULL" to "" - Mailing list pgsql-novice

From Jochen Weyermanns
Subject Re: cat infile | translate all occurences of "NOT NULL" to ""
Date
Msg-id C1256957.00516366.00@kisters-ac1.kisters.de
Whole thread Raw
List 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 by date:

Previous
From: "Tamsin"
Date:
Subject: RE: cat infile | translate all occurences of "NOT NULL" to ""
Next
From: The Hermit Hacker
Date:
Subject: RE: cat infile | translate all occurences of "NOT NULL" to ""