delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/10/02/12:37:51

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3D9B20D1.C5F48E68@iee.org>
Date: Wed, 02 Oct 2002 17:37:37 +0100
From: Don Sharp <dwsharp AT iee DOT org>
X-Accept-Language: en
MIME-Version: 1.0
To: gnuwin32 <cygwin AT cygwin DOT com>
Subject: Re: gawk not taking redirected input under command.com
References: <20021002151426 DOT 71805 DOT qmail AT web40614 DOT mail DOT yahoo DOT com>

Is it possible that cmd.exe (and command.com) redirections and pipes are
not acceptable whereas bash.exe uses Cygwin implemented redirections?

Cheers

Don Sharp

Barry Buchbinder wrote:
> 
> It's definitly cygwin's gawk doing it.
> 
>   C:\> c:\cygwin\bin\gawk -f t < autoexec.bat
>   GAWK: t:3: fatal: file `-' is a directory
> 
> The following gives the expect output:
> 
>   C:\> c:\cygwin\bin\gawk -f t autoexec.bat
> 
> There is no other gawk in the path.
> 
> In bash:
> 
>   /c> type -a gawk
>   gawk is /bin/gawk
>   /c> /bin/which gawk
>   /bin/gawk
> 
> In command.com, using both cygwin which and an MS-DOS
> which:
> 
>   C:\> c:\cygwin\bin\which.exe gawk
>   /usr/bin/gawk
> 
>   C:\> c:\bin\which.exe gawk
>   C:/CYGWIN/BIN/gawk.exe
> 
> In command.com, doing "dir /s /b" on all of the C:
> drive:
> 
>   C:\> dir /s /b gawk.exe
>   C:\cygwin\bin\gawk.exe
> 
> Similar searches for gawk.bat and gawk.com find
> nothing.
> 
> - Barry
> 
> -----Original Message-----
> From: Christopher Faylor
> [mailto:cgf-cygwin AT cygwin DOT com]
> Sent: Wednesday, October 02, 2002 10:14 am
> To: cygwin AT cygwin DOT com
> Subject: Re: gawk not taking redirected input under
> command.com
> 
> On Wed, Oct 02, 2002 at 05:47:52AM -0700, Barry
> Buchbinder wrote:
> >I have a problem with gawk.
> >
> >Under bash, it works as expected.
> >
> >Under command.com (win98se) it does the following
> when
> >taking input from a pipe or by redirection.
> >
> >  C:\> cat autoexec.bat | gawk '{ print "!" $0 "!" }'
> >  GAWK: cmd. line:2: fatal: file `-' is a directory
> >
> >  C:\> gawk '{ print "!" $0 "!" }' < autoexec.bat
> >  GAWK: cmd. line:2: fatal: file `-' is a directory
> 
> Sounds like you have another, non-cygwin version of
> gawk on your system.
> 
> cgf
> 
> __________________________________________________
> Do you Yahoo!?
> New DSL Internet Access from SBC & Yahoo!
> http://sbc.yahoo.com
> 
> --
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
> Bug reporting:         http://cygwin.com/bugs.html
> Documentation:         http://cygwin.com/docs.html
> FAQ:                   http://cygwin.com/faq/

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019