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 -->
  #4 (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 | awk '{print $1}'`

The problem is if i execute the above command without awk. I am getting an value.


I am sure that,


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

( with out awk )

also wont return anything and ther is some issue with the data base connectvity. Because the next awk statemnt is nothng to do much other than priting.