[ale] awk masters...
jojerose at mindspring.com
jojerose at mindspring.com
Mon Jul 7 17:58:16 EDT 2003
quick question
I'm writing a script to search a file for specific codes, If the codes are found, I want to extract the record from the file. goes something like this...
for i in `cat codes.dat`
do
awk '{if(substr($1,7,2) == '$i') print $1}' recs.dat > newfile.dat
....
....
done
it's the $i that i can't get to work. awk thinks it is one of 'its' variables. How can I get awk to recognize it as a shell variable?
Thanks for the help
Jeff Rose
_______________________________________________
Ale mailing list
Ale at ale.org
http://www.ale.org/mailman/listinfo/ale
More information about the Ale
mailing list