Re: Newbie can't get gnu grep to produce results

Pascal Bourguignon <[email protected]>
Newsgroups gmane.comp.gnu.utils
Organization Informatimago
Message-ID <[email protected]>
RichardL <[email protected]> writes:
> K:\Temp\GnuTest>grep -l -i 'hello' *.txt

I know not much of MS-DOS and even less of MS-Windows, but ISTR that
the * is not expanded by COMMAND.COM.  grep finds no file named
'*.txt' so it prints nothing, which is as documented.

Try: 

   grep -l -i hello song.txt HelloWorld.txt

If that works, then download http://www.cygwin.com/setup.exe
install cygwin, and use bash as shell instead of COMMAND.COM.
Unix shells do expand characters such as * themselves.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
Our enemies are innovative and resourceful, and so are we. They never
stop thinking about new ways to harm our country and our people, and
neither do we. -- Georges W. Bush
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.