[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[ale] awk masters...
- Subject: [ale] awk masters...
- From: jojerose at mindspring.com (jojerose at mindspring.com)
- Date: Mon, 7 Jul 2003 17:58:16 -0400 (EDT)
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