The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #4 (permalink)  
Old 07-11-2006
lok lok is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 3
Quote:
Originally Posted by jim mcnamara
Code:
awk 'substr($0,24,1)=="0"  '  filename
How if i wan to replace the 0 with any other variable??

I had try this :
#
item=10023
awk 'substr($0,24,1)=="$item" ' filename
#

but it cannot work. the system will take the $item as a string directly.