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

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

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


From: RichardL
Subject: Re: Newbie can't get gnu grep to produce results
Date: Wed, 25 Jul 2007 15:08:35 -0700
User-agent: G2/1.0

On Jul 25, 5:23 pm, RichardL
<RichardDummyMailbox58...@USComputerGurus.com> wrote:
> On Jul 25, 11:39 am, Pascal Bourguignon <p...@informatimago.com>
> wrote:
>
>
>
> > RichardL <RichardDummyMailbox58...@USComputerGurus.com> 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 downloadhttp://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
>
> Thanks Pascal,
>
> The command you recommended worked perfectly,  i.e. it reported back
> both filenames.
>
> I am in the process of trying out Win-Bash because it advertises
> itself as being self-contained, i.e no DLLs to worry about.  Do you
> think Cygwin's bash is substantially superior to Win-Bash?  While I
> await learning your opinion, I'll fool around with it.
> --
> Richard

Win-Bash does the job exactly as I expected, as you can see below.
Again, thank you very much for rescuing me from my quandary
-- Richard.

Start | Run win-bash
[Command window opens]
bash$ grep --v
grep (GNU grep) 2.5.1

Copyright 1988, 1992-1999, 2000, 2001 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is
NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR
PURPOSE.

bash$ cd K:/Temp/GnuTest
bash$  grep -l -i hello *.txt
HelloWorld.txt
Song.txt
bash$




reply via email to

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