delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/10/01/09:37:41

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
X-Authentication-Warning: slinky.cs.nyu.edu: pechtcha owned process doing -bs
Date: Wed, 1 Oct 2003 09:37:29 -0400 (EDT)
From: Igor Pechtchanski <pechtcha AT cs DOT nyu DOT edu>
Reply-To: cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
Subject: Re: awk bug in cygwin 1.5.5 under windows xp
In-Reply-To: <20031001100628.GC11435@cygbert.vinschen.de>
Message-ID: <Pine.GSO.4.56.0310010929030.26607@slinky.cs.nyu.edu>
References: <000001c387fd$1266d2b0$30cea783 AT bt09fischerxp>
<20031001100628 DOT GC11435 AT cygbert DOT vinschen DOT de>
Importance: Normal
MIME-Version: 1.0

On Wed, 1 Oct 2003, Corinna Vinschen wrote:

> On Wed, Oct 01, 2003 at 11:19:10AM +0200, Karsten Fischer wrote:
> > awk fails when called from the cmd or cmdproxy shell. The shell does not
> > interpret correctly the link to gawk. Apparently this observation was
>
> That's a problem of the shell, not of gawk.  The installation procedure
> of gawk on Cygwin is identical to the installation procedure of gawk on
> Linux.  awk is just a symlink to gawk.

I believe a solution was suggested before: distribute a .bat file for
common symlinks.  If the awk package contained /bin/awk.bat (which called
gawk.exe), "awk" would work in both the cmd prompt and Cygwin shells.
Similarly for "vi", "gunzip", "[ef]grep", "[ck]sh", "zcat", etc.  One
problem is that parameter passing is tricky, and may need advanced cmd.exe
features (i.e., won't work on Win9x)...  Another is that you can't use
commands like "exit" in those batch files (or you'd need to "call" them,
which breaks the transparency).

> > reported several times in the internet.
> >
> > Changing all "awk" to "gawk" in my scripts works fine, but a more
> > elegant solution would be desirable.

A question to the OP: which scripts?  If they are shell scripts, you
shouldn't have this problem in the first place.  Are you using "awk" in
batch files?

> Using ash, bash, ksh, pdksh, tcsh, zsh would actually help.  The Cygwin
> distribution is not designed to run in a native Windows shell in the
> first place.
>
> Corinna

Oh?  Then what's with the @pathnames
(<http://cygwin.com/cygwin-ug-net/using-specialnames.html#AEN830>)? ;-)
	Igor
-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor AT watson DOT ibm DOT com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster."  -- Patrick Naughton

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.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