Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

problem with grep

10 views
Skip to first unread message

Stanke, Fred

unread,
Apr 18, 2018, 8:44:45 PM4/18/18
to help-gn...@gnu.org
I am not a unix guy, but I've come to depend on emacs after using it for decades.

I have a problem, grep does not work. How do I fix it?

-*- mode: grep; default-directory: "c:/Users/fstanke/Documents/" -*-
Grep started at Wed Apr 18 17:14:36

grep -n cycles *.txt NUL
'grep' is not recognized as an internal or external command,
operable program or batch file.

Grep exited abnormally with code 1 at Wed Apr 18 17:14:38

Eli Zaretskii

unread,
Apr 19, 2018, 2:38:08 AM4/19/18
to help-gn...@gnu.org
> From: "Stanke, Fred" <fst...@nanometrics.com>
> Date: Thu, 19 Apr 2018 00:16:34 +0000
> I have a problem, grep does not work. How do I fix it?
>
> -*- mode: grep; default-directory: "c:/Users/fstanke/Documents/" -*-
> Grep started at Wed Apr 18 17:14:36
>
> grep -n cycles *.txt NUL
> 'grep' is not recognized as an internal or external command,
> operable program or batch file.
>
> Grep exited abnormally with code 1 at Wed Apr 18 17:14:38

Install a port of GNU Grep. There are several ports floating around
that you can use.

Ben Bacarisse

unread,
Apr 19, 2018, 12:19:38 PM4/19/18
to
The obvious question is whether you have grep installed. If you do, it
looks like emacs does not know about it. There is a group you can
customise that might be worth looking at as well.

I can't be more helpful because I use emacs on Linux, so things are
rather different.

--
Ben.

Emanuel Berg

unread,
Apr 19, 2018, 1:49:54 PM4/19/18
to
Ben Bacarisse wrote:

> I can't be more helpful because I use emacs
> on Linux, so things are rather different.

*much better

--
underground experts united
http://user.it.uu.se/~embe8573

Dan Espen

unread,
Apr 19, 2018, 4:43:43 PM4/19/18
to
"Stanke, Fred" <fst...@nanometrics.com> writes:

> I am not a unix guy, but I've come to depend on emacs after using it for decades.
>
> I have a problem, grep does not work. How do I fix it?
...
> 'grep' is not recognized as an internal or external command,
> operable program or batch file.

When I had to use Windows, I found the path of least resistance was to
install the Cygwin package. That includes grep and lots of other
very useful Unix-y stuff, including diff which also works well with Emacs.

--
Dan Espen

Eli Zaretskii

unread,
Apr 20, 2018, 2:40:51 AM4/20/18
to help-gn...@gnu.org
> From: Dan Espen <dan1...@gmail.com>
> Date: Thu, 19 Apr 2018 16:43:40 -0400
>
> When I had to use Windows, I found the path of least resistance was to
> install the Cygwin package. That includes grep and lots of other
> very useful Unix-y stuff, including diff which also works well with Emacs.

Since nowadays native Windows ports of all the important GNU utilities
are available, I don't think suggesting Cygwin is a good idea, because
using Cygwin programs with native Windows build of Emacs has subtle
problems which will require further non-default setups and tinkering.

People who want Cygwin (and generally like to feel almost like on a
Posix system) should install a Cygwin build of Emacs, not a native
build.

Rusi

unread,
Apr 20, 2018, 7:53:32 AM4/20/18
to
On Friday, April 20, 2018 at 12:10:51 PM UTC+5:30, Eli Zaretskii wrote:
> > From: Dan Espen
I wonder whether one should say
gnuwin32 (or unixutils?) < msys (ming?) < cygwin
is an increasing order of nixiness but also increasing order of heavyweightness?

Eli Zaretskii

unread,
Apr 20, 2018, 9:00:36 AM4/20/18
to help-gn...@gnu.org
> Date: Fri, 20 Apr 2018 04:53:30 -0700 (PDT)
> From: Rusi <rusto...@gmail.com>
>
> I wonder whether one should say
> gnuwin32 (or unixutils?) < msys (ming?) < cygwin
> is an increasing order of nixiness but also increasing order of heavyweightness?

MSYS is a fork of Cygwin, with relatively few changes, so the distance
between the two is very short.

(Both GnuWin32 and UnxUtils AFAIK offer very old ports, so they are
not what I'd suggest as the first place to look for recent ports.)

Tomas Nordin

unread,
Apr 20, 2018, 1:51:29 PM4/20/18
to Dan Espen, help-gn...@gnu.org
Dan Espen <dan1...@gmail.com> writes:

> "Stanke, Fred" <fst...@nanometrics.com> writes:
>
>> I am not a unix guy, but I've come to depend on emacs after using it for decades.
>>
>> I have a problem, grep does not work. How do I fix it?
> ...
>> 'grep' is not recognized as an internal or external command,
>> operable program or batch file.
>
> When I had to use Windows, I found the path of least resistance was to

A lot of people use Git, also on Windows, typically the Git for Windows
installation. On Windows I have found the path of least resistance to be
to use the Gnu tools provided with the Git installation. There is some
talk about the file structure here:
https://superuser.com/questions/1053633/what-is-git-bash-for-windows-anyway#1053657

James K. Lowden

unread,
Apr 20, 2018, 3:11:07 PM4/20/18
to
On Fri, 20 Apr 2018 16:00:09 +0300
Eli Zaretskii <el...@gnu.org> wrote:

> (Both GnuWin32 and UnxUtils AFAIK offer very old ports, so they are
> not what I'd suggest as the first place to look for recent ports.)

I haven't used them in a few years, but if Grep for Windows is all you
need to complete your emacs bliss, I'd start with GnuWin32. No harm in
trying; easy to delete if it doesn't delight.

--jkl

0 new messages