llevity:
The informix dbaccess and isql utilities were written as pipes, so if you don't want to use files you can use "here" documents:
dbaccess -e testdb <<EDS
select * from test_table
<<EDS
or
echo "select * from test_table"|dbaccess -e testdb
of you can even take advantage of shell variables:
export DBNAME=testdb
echo "select * from test_table"|dbaccess -e "$DBNAME"
Also, you might put dbaccess in it's own shell script. Call the script x.ss:
dbaccess -e testdb <<EDS
$1
EDs
and call it this way:
x.ss "select * from test_table"
Regards,
Ed
Schaefer