I have a working awk statement like so:
awk 'substr($0,815,2)==03{print}' outfile.txt
This statement works and pulls out records that meet have "03" in positions 815 - 816. What I want to do is specify a list of criteria, like ==03,H1,ZZ.
But I can not get this to work correctly. I tried this:
awk 'substr($0,60,1)==/03||H1||ZZ/{print}' outfile.txt
but no dice. Can someone please help? I think I need to use Awk do to the file size and as a requirement I must accomplish this with one command line. This last requirement is a must and out of my control!
Please help, thanks in advance.
-dnix
Running in an AIX environment (in case its relevant.)
awk 'substr($0,815,2)==03{print}' outfile.txt
This statement works and pulls out records that meet have "03" in positions 815 - 816. What I want to do is specify a list of criteria, like ==03,H1,ZZ.
But I can not get this to work correctly. I tried this:
awk 'substr($0,60,1)==/03||H1||ZZ/{print}' outfile.txt
but no dice. Can someone please help? I think I need to use Awk do to the file size and as a requirement I must accomplish this with one command line. This last requirement is a must and out of my control!
Please help, thanks in advance.
-dnix
Running in an AIX environment (in case its relevant.)