Re: Problem with grep

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2004-01-27 at 17:04, Gilbert Sebenste wrote:
> 
> As part of something I am doing here, I need grep to search a file for
> "-10-", minus the quotes. If it exists, it needs to do a command. So, my 
> grep line looks like this:


The unix standard for bypassing problems like this is to put "--" on the
command line before your pattern. This is a unix convention for "no more
flag options follow", and seems to work in this case.

Eg. 

  grep -- "-10-" file

Cheers, Ben





[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux