Search:  

 
 
   All ForumsHot TopicsGallery






how-to block ads


 
Forums » Tech and Talk » OS and Software » All Things Unix » Literal double dash searching using fgrep?
Search Topic:
Uniqs:
168
Share Topic:
RSS topic:
toggle:
flat / full
normal / watch
Posting:
Post a:
Post a:
Linux beginner can't browse via Konqueror »
« Help with LVM... (Resolved)  
AuthorAll Replies


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 See Profile.


thrillhaus
Premium
join:2003-12-26
Tucson, AZ
clubs:
reply to thrillhaus
Perfect. Thanks all
--
-thrillhaus
-
Forums » Tech and Talk » OS and Software » All Things UnixLinux beginner can't browse via Konqueror »
« Help with LVM... (Resolved)  


Tuesday, 02-Dec 08:50:09 Terms of Use | Privacy Policy | Hosting by www.nac.net - DSL,Hosting & Co-lo | feedback | contact
over 9 years online! © 1999-2008 dslreports.com.
page compression OFF
Most commented news this week
· [99] AT&T Metered Billing Trial Hits Second Market
· [71] UDP BitTorrent Will Destroy The Interwebs!
· [57] Comcast Tries To Slow Verizon's Philly Entry
· [17] FCC To Vote On Free National Wireless Broadband
· [14] Clearwire May Slow WiMax Build
· [9] Hawaii Telecom Files For Bankruptcy
· [8] Embarq Rejected Higher Offer
· [6] Monday Evening Links
· [0] Tuesday Morning Links
· [0] EFF Challenges Telecom Immunity
Most people now reading
· Is this a good thing for the net? [news,99366]
· Level 80 PVP gear info? [World of Warcraft]
· Upverting DVD players vs Blue ray DVD players. [General Questions]
· 80 done, Naxx cleared.....can you say WOW...GG? [World of Warcraft]
· Coalition Government Possible? [TekSavvy]
· Notice, new uTorrent Alpha may be able to evade throttling [TekSavvy]
· Java SE Runtime Environment (JRE) 6 Update 11 [Security]
· Upgrade from 768kbps/128kbps to 1Mbps/386kbps? [Verizon Online DSL]