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.
variable=`db2 -x "select col1 from table1"`