Search Postgresql Archives

Re: How to get variable out to shell script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Attachment: signature.asc
Description: This is a digitally signed message part


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux