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

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

Re: How to run an awk command on file in emacs - using minGW on Windows


From: Eli Zaretskii
Subject: Re: How to run an awk command on file in emacs - using minGW on Windows
Date: Wed, 18 Sep 2013 13:13:29 +0300

> Date: Wed, 18 Sep 2013 10:55:19 +0100
> From: Angus Comber <address@hidden>
> Cc: Emacs Help <address@hidden>
> 
> I removed my PC's %SHELL% variable (set to C:/MinGW/msys/1.0/bin/bash.exe)
> 
> I removed this line in my emacs init.el file (emacs init file)
> 
>  '(shell-file-name "C:/MinGW/msys/1.0/bin/bash.exe")
> 
> After doing that I still have same issue and even using ' /Sam/' workaround
> doesn't work.  So this move doesn't look helpful.

First, start with "emacs -Q", since there could be other
customizations in your .emacs that interfere.  Then try this:

  M-! gawk.exe /Sam/ test.txt

Note: no quote characters around /Sam/, and call 'gawk.exe' directly
(since 'awk' might be a shell script, which again brings the MSYS
shell into the play).

If this does not work, then your gawk.exe is probably an MSYS program,
so you have the same filename-mangling problem again.  You can find a
native port of Gawk here:

  
http://sourceforge.net/projects/ezwinports/files/gawk-4.1.0-2-w32-bin.zip/download

Try using it instead.

In general, remove the MSYS bin directory from your PATH, at least
when you are using Emacs, and install native Windows ports of the Unix
utilities that you need, putting them in a directory where Emacs can
find them.



reply via email to

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