[Top][All Lists]

[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: Angus Comber
Subject: Re: How to run an awk command on file in emacs - using minGW on Windows
Date: Wed, 18 Sep 2013 14:52:53 +0100

On 18 September 2013 11:13, Eli Zaretskii <address@hidden> wrote:

> > 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:
> 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.
I really can't thank you enough.  Updating the awk versions has fixed the
issue.  I have removed shell from emacs config and everything is working
file (after awk program update as per your link).

Many thanks.

reply via email to

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