  thrillhaus Premium join:2003-12-26 Tucson, AZ clubs:
·Cox HSI
| Literal double dash searching using fgrep?
I know this is probably a stupid question.. but I cannot for the life of me figure out how to use fgrep to search for a literal double dash (--). I've tried using [--] and some other variations. Google wasn't much help either. So I'd appreciate if someone could help me out here.
Thanks  -- -thrillhaus |
|
 pablo2525
join:2003-06-23
| Hi,
Here you go: sh code:$ cat x This is some fun We ate worms and bugs -- just kidding. $ grep - -- x We ate worms and bugs -- just kidding.
-- pablo openSUSE 11.0;KDE ISP: TekSavvy DSL; backhauled via a 6KM wireless link |
|
  shdesigns Powered By Infinite Improbabilty Drive Premium join:2000-12-01 Stone Mountain, GA
·Atlantic Nexus
| reply to thrillhaus
from the man page:
|
|
 dave Premium,MVM join:2000-05-04 not in ohio
·Verizon Online DSL
edit: September 3rd, @10:18AM
| reply to thrillhaus $ grep -- -- crap.txt must dash -- things to do
The first '--' on the grep command line means 'end of options', so the second '--' is taken literally.
Actually, I guess this was the same as 'grep - -- crap.txt' suggested above by pablo2525 . |
|
  thrillhaus Premium join:2003-12-26 Tucson, AZ clubs: | reply to thrillhaus Perfect. Thanks all  -- -thrillhaus |
|