Re: How to get variable out to shell script

Поиск
Список
Период
Сортировка
От Devrim GÜNDÜZ
Тема Re: How to get variable out to shell script
Дата
Msg-id 1253484643.880.42.camel@hp-laptop2.gunduz.org
обсуждение исходный текст
Ответ на How to get variable out to shell script  (Alex Gadea <alex.gadea@apptik.com>)
Список pgsql-general
On Sun, 2009-09-20 at 16:49 -0500, Alex Gadea wrote:
> I am using psql to call an external sql file that executes a simple
> select count(*):
>
> ie: select into ct count(*) from table;
>
> I can't figure out how to make the ct variable available to the shell
> script once the external sql file completes execution.

Try

psql -At -c "SELECT ..."

--
Devrim GÜNDÜZ, RHCE
Command Prompt - http://www.CommandPrompt.com
devrim~gunduz.org, devrim~PostgreSQL.org, devrim.gunduz~linux.org.tr
                   http://www.gunduz.org

Вложения

В списке pgsql-general по дате отправления:

Предыдущее
От: Scott Marlowe
Дата:
Сообщение: Re: How to get variable out to shell script
Следующее
От: Sam Mason
Дата:
Сообщение: Re: How to get variable out to shell script