Problem with grep
Ben Stringer
ben at burbong.com
Tue Jan 27 06:12:21 UTC 2004
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
More information about the fedora-list
mailing list