Re: postgres via shell scripts - Mailing list pgsql-general

From Peter Eisentraut
Subject Re: postgres via shell scripts
Date
Msg-id Pine.LNX.4.21.0010061803000.949-100000@peter.localdomain
Whole thread Raw
In response to Re: postgres via shell scripts  (Jim Mercer <jim@reptiles.org>)
List 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@gmx.net       http://yi.org/peter-e/


pgsql-general by date:

Previous
From: Jim Mercer
Date:
Subject: Re: postgres via shell scripts
Next
From: Peter Eisentraut
Date:
Subject: Re: postgres via shell scripts