AdamCoombs
Technical User
Ok,
I have a file that looks like:
1 Bob
2 Fred
3 Barry
etc etc.
i need to search on the number and print the name..easy when there is only 9 people in the file..cos i can grep the number out and then pipe it through an awk to print $2 BUT when it get to double figures, if you grep "1" then it will also come up with 11, 12 etc etc...
cant go a fgrep -x, tried to cut the first coloum out but then dont know how to print the second field..
any ideas?
thanks
Adam
I have a file that looks like:
1 Bob
2 Fred
3 Barry
etc etc.
i need to search on the number and print the name..easy when there is only 9 people in the file..cos i can grep the number out and then pipe it through an awk to print $2 BUT when it get to double figures, if you grep "1" then it will also come up with 11, 12 etc etc...
cant go a fgrep -x, tried to cut the first coloum out but then dont know how to print the second field..
any ideas?
thanks
Adam