May 1, 2003 #1 kellert Technical User Joined May 1, 2003 Messages 1 Location US Using grep, how do I search the file t.txt for the string -6 ?
May 2, 2003 #2 Salem Programmer Joined Apr 29, 2003 Messages 2,455 Location GB grep -- -6 t.txt The -- means "end of options", so anything with a leading minus after that is NOT treated as an option Upvote 0 Downvote
grep -- -6 t.txt The -- means "end of options", so anything with a leading minus after that is NOT treated as an option
May 2, 2003 #3 KenCunningham Technical User Joined Mar 20, 2001 Messages 8,475 Location GB Alternatively, grep '\-6' test, the \ meaning 'treat the following as a normal character'. Cheers. Upvote 0 Downvote
May 2, 2003 #4 KenCunningham Technical User Joined Mar 20, 2001 Messages 8,475 Location GB Oops. Replace test above with t.txt for it to work with your example. Upvote 0 Downvote