Skip site navigation (1) Skip section navigation (2)

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 (view raw or flat)
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



pgsql-novice by date

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

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group