Hi
I have a multi -line file which is sorted by the 1-st colomn in the following format:
400 0000 0001 1000 1010 0111 0000 1000 0000
402 1101 0000 1100 1010 0111 1000 1000 0000
403 1001 0000 1100 1010 0111 0000 1000 0000
495 1000 0000 1100 1010 0111 0000 1000 0000
500 0000 0001 1000 0010 0111 0000 0000 0000
653 0000 0001 1000 0010 0111 1000 0000 0001
711 0000 0001 1000 1010 0111 1000 1000 0000
745 0000 0001 1000 0010 0111 0000 1000 0001
818 1101 0000 1100 1010 0111 0000 1000 0000
896 1000 0000 1100 1010 0111 0000 1000 0000
914 0000 0001 1000 0010 0111 0000 0000 0000
I need to identify/print the line in which the value of first colomn is the less then certain number I would pass as argument to the script.
For example:
I have a variable PX=817, the awk (hopefully) would take this variable and return the following line from the file:
745 0000 0001 1000 0010 0111 0000 1000 0001
Thanks a lot for any advice...
PS: Can anybody recommend a good book(s) for awk programming ? Thanks again -A