|
Help with awk
Hi Guys,,
I am assigning a query result to a variable.
variable=`db2 -x "select col1 from table1 | awk '{print $1}'`
The problem is if i execute the above command without awk. I am getting an value. But if i execute with awk command, i am getting an error, saying
A database connection does not exists.
I want the awk command to be used.
Please help me.
Thanks for your help in advance,
Magesh
|