The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




Thread: Help with awk
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #2 (permalink)  
Old 05-26-2009
panyam panyam is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2008
Posts: 474

Code:
variable=`db2 -x "select col1 from table1`

is it correct ?.. i can see only one double quote ".

how ever u can try somethng like this


Code:
variable1=`db2 -x "select col1 from table1"`
variable=`echo "$variable1" | awk '{print $1}' `