using the output of a sql statement in a shell script
Posted in 1998
josephatlanta@my-dejanews.com — — source: Informix-list mailing list archive (1991-1998)
Is there a SQL statement that can give me the output of the switches without
the "switch_id" and/or the "14 row(s) retreived." text?
There may be any amount of switches, and I either need to write the shell
script to parse the extra text out, or get the SQL statement to omit it.
Thanks for your help!
================================================
response=`
{
dbaccess ${dbname} - <<EOF
select switch_id from switches where switch_id4 = "M1"EOF
} 2>&1 `
echo $response
#switch_id RIM 2JY 2JV CLX 2OR ASC AU1 AUP BCS AUA AUO BOY BHW 2M8 14 row(s)
retrieved.
-----== Posted via Deja News, The Leader in Internet Discussion ==-----
http://www.dejanews.com/rg_mkgrp.xp Create Your Own Free Member Forum