Re: postgres via shell scripts

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Jim Mercer <jim(at)reptiles(dot)org>
Cc: bmccoy(at)chapelperilous(dot)net, Mike Sears <msears(at)vianet(dot)ca>, pgsql-general(at)postgresql(dot)org
Subject: Re: postgres via shell scripts
Date: 2000-10-06 16:04:05
Message-ID: Pine.LNX.4.21.0010061803000.949-100000@peter.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Jim Mercer writes:

> psql -A -t -q -d database -c "sql query" > tempfile
> if [ $? -ne 0 ] ; then
> echo command failed
> exit
> fi
> awk -F\| -f script.awk tempfile
> .....
>
> there is a commandline options somewhere to change he field seperator, but
> i forget it now.

It's also -F!

--
Peter Eisentraut peter_e(at)gmx(dot)net http://yi.org/peter-e/

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Peter Eisentraut 2000-10-06 16:05:41 Re: postgres via shell scripts
Previous Message Jim Mercer 2000-10-06 15:19:03 Re: postgres via shell scripts