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

From: "Jochen Weyermanns" <jowe(at)kisters(dot)de>
To: "Dan Browning" <danb(at)cyclonecomputers(dot)com>
Cc: pgsql-novice(at)postgresql(dot)org
Subject: Re: cat infile | translate all occurences of "NOT NULL" to ""
Date: 2000-09-11 14:48:57
Message-ID: C1256957.00516366.00@kisters-ac1.kisters.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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

Browse pgsql-novice by date

  From Date Subject
Next Message The Hermit Hacker 2000-09-11 14:53:31 RE: cat infile | translate all occurences of "NOT NULL" to ""
Previous Message Tom Lane 2000-09-11 14:44:16 Re: Multiple Selects