[Top][All Lists]

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

grep '-o' ???

From: Leslie E. Ballentine
Subject: grep '-o' ???
Date: Wed, 31 Oct 2007 19:20:33 -0700
User-agent: Mutt/1.5.6i

Here is a strange behavior, which I find using version 2.5.1 of grep.

>address@hidden ~]% cat testfile
> -o sss
>address@hidden ~]% grep 'o' testfile
> -o sss
>address@hidden ~]% grep '-o' testfile

At this point, grep hangs indefinitely.
It seems that grep cannot find the string '-o'.
Maybe it is interpreting -o as an option (although I would think that the
single quotes would stop that from happening), but even that does not 
explain the behavior.

Can you explain what is happening?
And how do I search a file for the characters "-o"?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]