How to get variable out to shell script

From: Alex Gadea <alex(dot)gadea(at)apptik(dot)com>
To: pgsql-general(at)postgresql(dot)org
Subject: How to get variable out to shell script
Date: 2009-09-20 21:49:03
Message-ID: 202440284.41211253483343586.JavaMail.root@mail-3.01.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

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. What I am trying to do is run the count command against a table in two different databases on two different servers and then compare the variables.

Any ideas?

Thanks in advance.

Alex

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Scott Marlowe 2009-09-20 22:10:10 Re: How to get variable out to shell script
Previous Message Devrim GÜNDÜZ 2009-09-20 21:24:34 Re: MD5 sum mismatch in source rpm