Re: [ADMIN] multiple sql results to shell
Re: [ADMIN] multiple sql results to shell
От:
Geoff Winkless <pgsqladmin@geoff.dj>
Дата:
On 23 October 2017 at 23:14, Randy Strauss wrote: > To get input from a file w/o a sub-shell, > you can put the input at the end of the loop: That's a good point: and it also jogged my memory that in bash you can do process substitution, so while read a; do $a; done < <(psql -tqAX -c 'SELECT ...') will keep the read loop in the main process, not the child (unlike the "| while read" syntax) Geoff -- Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-admin