bug-gnu-utils
[Top][All Lists]
Advanced

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

Re: Bug grep


From: David Kastrup
Subject: Re: Bug grep
Date: Wed, 23 Apr 2008 11:02:45 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Burg, G.C.A. van den" <address@hidden> writes:

> Hi gnu,
>
> I just installed the latest Debian OS, basic system only and am
> disovering Linux. So, on a site it said: Also investigate the function
> grep. So I typed in : "grep -help" within the linux command line. This
> did nothing, except that I went inot a mode where I could only type, but
> not quit and go back to the command line. This was very frustrating for
> me, and I think it is a bug. Relogging was good enough for me, but I
> still would like to now how it comes that I get into a mode where I can
> only type, and do nothing else.

Standard Unix tool behavior: it is reading from stdin.  Type C-d to give
it an EOF.  GNU tools all have a --help option (notice the double
hyphen).

grep -help, in contrast is just a shorthand for

grep -h -e lp

which means "don't print file headers before lines, and use lp as the
pattern to look for on stdin, echoing results to stdout".

So whenever you type a line containing "lp" to this grep session, it
will echo it.

-- 
David Kastrup





reply via email to

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