Feb 3, 2006 #1 Neelimaix Technical User Jun 29, 2005 23 US hi i have a file with nil-=100 nil=1000 nil=10002 when i do $grep 100 filena.txt its printing all the lones how can i print only one it matches ? Thanks, A
hi i have a file with nil-=100 nil=1000 nil=10002 when i do $grep 100 filena.txt its printing all the lones how can i print only one it matches ? Thanks, A
Feb 3, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR grep '=100$' filena.txt Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
grep '=100$' filena.txt Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Feb 4, 2006 #3 p5wizard IS-IT--Management Apr 18, 2005 3,165 BE grep -w 100 may also do it, but not sure how grep defines a word. If a word is any character string delimited by whitespace, then it won't. Try it. HTH, p5wizard Upvote 0 Downvote
grep -w 100 may also do it, but not sure how grep defines a word. If a word is any character string delimited by whitespace, then it won't. Try it. HTH, p5wizard
Feb 4, 2006 #4 PHV MIS Nov 8, 2002 53,708 FR Furthermore the -w option isn't (AFAIK) POSIX (nor X/OPEN) compliant. Upvote 0 Downvote