Re: dbaccess from shell scripts
Posted in 1998
And yet another way of doing it in a script:
------------
#!/bin/ksh
dbaccess db <<EOT
SELECT foo FROM bar;EOT
------------
I prefer this method as it is more readable.
denzil
In article <6anvjs$6fe@world6.bellatlantic.net>, gerardc@bellatlantic.net
says...
> You can also echo the SQL and pipe it to dbaccess -
>
> ie.
> echo "database test_db;
> select * from mytable;" | dbaccess ->
> Gerard Crockenberg
> President
> Crockenberg Consulting, LLC
> gerardc@bbellatlantic.net
>
> Jason Harris wrote in message <34ceb712.13869733@10.209.30.200>...
> >On 27 Jan 1998 08:53:13 -0500, tr-2959@mail.necgroup.co.uk
> >("Tony_Reynolds(Accounting & Purchasing System") wrote:
> >
> >>Any unix guru's out there?
> >>I'm trying to run an update through a shell script using dbaccess.
> >>I se up the environment in the script.
> >>and use dbaccess /home/informix/update.sql
> >
> >try dbaccess <db_name> /home/informix/update.sql
> >
> >Jason
> >
>
>
>