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

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

From: Webb Sprague <wsprague100(at)yahoo(dot)com>
To: Dan Browning <danb(at)cyclonecomputers(dot)com>, pgsql-novice(at)postgresql(dot)org, redhat-list(at)redhat(dot)com, jsokel(at)mdsi-usa(dot)com
Subject: Re: cat infile | translate all occurences of "NOT NULL" to ""
Date: 2000-09-11 19:38:31
Message-ID: 20000911193831.7947.qmail@web805.mail.yahoo.com (view raw or flat)
Thread:
Lists: pgsql-novice
The easiest thing is probably to use vi.  Then write
	:s/"NOT NULL"/""/gc
the `g' will do each occurence, and the `c' will ask
for confirmation.  Once you are sure everything will
be fine, let it do `all'.

Otherwise, you can use `sed', but that is weird...

W
--- Dan Browning <danb(at)cyclonecomputers(dot)com> wrote:
> 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.
> 
> Thanks,
> 
> Dan Browning
> Network & Database Administrator
> Cyclone Computer Systems
> 


__________________________________________________
Do You Yahoo!?
Yahoo! Mail - Free email you can access from anywhere!
http://mail.yahoo.com/

pgsql-novice by date

Next:From: EduardoDate: 2000-09-11 20:16:48
Subject: Change varchar lenght
Previous:From: Stephan SzaboDate: 2000-09-11 16:37:42
Subject: Re: Removing all NOT NULL constraints from multiple tables easily

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