Jump to content

Recommended Posts

Guest Don Culp
Posted

I need a version of grep (or similar) that will run from a command line

(from a batch file) under Win x64. It should simply run and then exit

without opening any windows that require user input. Preferably it should

also be free.

 

Thanks,

Don Culp

  • Replies 8
  • Created
  • Last Reply

Popular Days

Guest Steve Foster [SBS MVP]
Posted

Re: Need grep

 

Don Culp wrote:

>I need a version of grep (or similar) that will run from a command line

>(from a batch file) under Win x64. It should simply run and then exit

>without opening any windows that require user input. Preferably it should

>also be free.

 

If the native "find" or "findstr" are not sufficient (they're kinda

"mini-grep"):

 

http://www.google.com/search?q=grep+windows+x64

 

--

Steve Foster [sBS MVP]

---------------------------------------

MVPs do not work for Microsoft. Please reply only to the newsgroups.

Guest Charlie Russel - MVP
Posted

Re: Need grep

 

They're NOT grep...

 

--

Charlie.

http://msmvps.com/xperts64

http://mvp.support.microsoft.com/profile/charlie.russel

 

 

"Steve Foster [sBS MVP]" <steve.foster@picamar.co.uk> wrote in message

news:xn0fq7krg8kgv3p00s@msnews.microsoft.com...

> Don Culp wrote:

>

>>I need a version of grep (or similar) that will run from a command line

>>(from a batch file) under Win x64. It should simply run and then exit

>>without opening any windows that require user input. Preferably it should

>>also be free.

>

> If the native "find" or "findstr" are not sufficient (they're kinda

> "mini-grep"):

>

> http://www.google.com/search?q=grep+windows+x64

>

> --

> Steve Foster [sBS MVP]

> ---------------------------------------

> MVPs do not work for Microsoft. Please reply only to the newsgroups.

Guest Charlie Russel - MVP
Posted

Re: Need grep

 

You can't run Subsystem for UNIX Applications (SUA) on XP x64, nor can you

install Services for UNIX. This leaves a huge hole. I never found a

reasonable solution, frankly. You can install PowerShell, which has way more

power and flexibility, and has a select-string that almost aliases to grep.

 

From Vista x64, however, the problem is solved. If you're running either the

Enterprise version, or the Ultimate version, you have Subsystem for UNIX

Applications (SUA), which includes a Korn shell. You can run that Korn

shell's grep from inside either a native Korn shell, or from inside

PowerShell.

 

--

Charlie.

http://msmvps.com/xperts64

http://mvp.support.microsoft.com/profile/charlie.russel

 

 

"Don Culp" <dculp@krell-engineering.com> wrote in message

news:ORZ1S4ltIHA.3564@TK2MSFTNGP03.phx.gbl...

>I need a version of grep (or similar) that will run from a command line

>(from a batch file) under Win x64. It should simply run and then exit

>without opening any windows that require user input. Preferably it should

>also be free.

>

> Thanks,

> Don Culp

>

>

Guest Don Culp
Posted

Re: Need grep

 

"find" basically does what I need. However, it outputs the name of each file

that it searches, regardless of whether the searched text has been found. I

would like it to only output the file name if that file contains the

searched text. Is this possible?

 

"Steve Foster [sBS MVP]" <steve.foster@picamar.co.uk> wrote in message

news:xn0fq7krg8kgv3p00s@msnews.microsoft.com...

> Don Culp wrote:

>

>>I need a version of grep (or similar) that will run from a command line

>>(from a batch file) under Win x64. It should simply run and then exit

>>without opening any windows that require user input. Preferably it should

>>also be free.

>

> If the native "find" or "findstr" are not sufficient (they're kinda

> "mini-grep"):

>

> http://www.google.com/search?q=grep+windows+x64

>

> --

> Steve Foster [sBS MVP]

> ---------------------------------------

> MVPs do not work for Microsoft. Please reply only to the newsgroups.

Guest Steve Foster [SBS MVP]
Posted

Re: Need grep

 

Don Culp wrote:

>"find" basically does what I need. However, it outputs the name of each

>file that it searches, regardless of whether the searched text has been

>found. I would like it to only output the file name if that file contains

>the searched text. Is this possible?

 

I don't think so with find, but findstr definitely can.

 

--

Steve Foster [sBS MVP]

---------------------------------------

MVPs do not work for Microsoft. Please reply only to the newsgroups.

Guest Allan
Posted

Re: Need grep

 

 

"Don Culp" <dculp@krell-engineering.com> wrote in message

news:ORZ1S4ltIHA.3564@TK2MSFTNGP03.phx.gbl...

>I need a version of grep (or similar) that will run from a command line

>(from a batch file) under Win x64. It should simply run and then exit

>without opening any windows that require user input. Preferably it should

>also be free.

>

It is easy if you already have DJGPP 2.04 beta installed (32-bit) as I do.

ftp://ftp.delorie.com/pub/djgpp/beta/v2gnu/grep253b.zip

I have the binaries for "gzip" and "bzip2" installed but not this one. You

have to install it as a directory without excessively long naming, so

"c:\djgpp204" is fine but "c:\program files\djgpp204" won't work.

 

--

Allan


×
×
  • Create New...