From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Angus Comber Newsgroups: gmane.emacs.help 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 Message-ID: References: <83bo3rpueb.fsf@gnu.org> <834n9jpdpo.fsf@gnu.org> <83ob7qo2t2.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 X-Trace: ger.gmane.org 1379512396 6912 80.91.229.3 (18 Sep 2013 13:53:16 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 18 Sep 2013 13:53:16 +0000 (UTC) Cc: Emacs Help To: Eli Zaretskii Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Sep 18 15:53:19 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1VMIBy-0003H6-B4 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Sep 2013 15:53:18 +0200 Original-Received: from localhost ([::1]:47044 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMIBy-0003SI-01 for geh-help-gnu-emacs@m.gmane.org; Wed, 18 Sep 2013 09:53:18 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:47412) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMIBh-0003Rz-RS for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 09:53:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VMIBg-0005D1-ID for help-gnu-emacs@gnu.org; Wed, 18 Sep 2013 09:53:01 -0400 Original-Received: from mail-pd0-x22d.google.com ([2607:f8b0:400e:c02::22d]:44080) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VMIBa-0005BI-SU; Wed, 18 Sep 2013 09:52:55 -0400 Original-Received: by mail-pd0-f173.google.com with SMTP id p10so7056922pdj.18 for ; Wed, 18 Sep 2013 06:52:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wntm0w1R78xcDgyRIqztpqynpwuN0jy18+AID10W6HQ=; b=j0DqjLK6YEMz9o4E+DEEk6dO/DO8d8SsK4Lidr3UxVgc5LWYpnZvZnKUEoeIG9HUBd ZsAdbak09/CtIUJd0hmDs+K2JLiul53DGFrx9lZ+NDvNuqqXiDdVLcQ/2kTFL2AkpUzy pIsVAUJquSVm6+eEm0EjAN70hoLRdc/PA7vGHdqkUEyGw5a1/TREZvTujHP76BSd4HDA SwAinAiEvM1JIWePffk2oZxuP9CiqxetxJSJPaV+hu1mwkTcLqQgiLsMfYxTFipMKeNq RbyhxGOFrXCybf42sqgtnTOnqXTp6Rha6+wb+9umvPofDZhkCXzVef9Oc3bS8U6kg3Ha 1YeA== X-Received: by 10.66.234.131 with SMTP id ue3mr42126590pac.35.1379512373155; Wed, 18 Sep 2013 06:52:53 -0700 (PDT) Original-Received: by 10.68.197.34 with HTTP; Wed, 18 Sep 2013 06:52:53 -0700 (PDT) In-Reply-To: <83ob7qo2t2.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2607:f8b0:400e:c02::22d X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:93442 Archived-At: On 18 September 2013 11:13, Eli Zaretskii wrote: > > Date: Wed, 18 Sep 2013 10:55:19 +0100 > > From: Angus Comber > > Cc: Emacs Help > > > > 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. > > *** 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.