The UNIX and Linux Forums  


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




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #7 (permalink)  
Old 01-14-2009
krishmaths krishmaths is offline
Registered User
  
 

Join Date: Sep 2006
Location: Mysore, India
Posts: 191
You need to use the -v option in awk to use shell variables, as below:


Code:
awk -v c=$counter 'NR==c {print $25}' $argv[1]