delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/25/00:04:49

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: <15FDCE057B48784C80836803AE3598D53B885A@racerx.ixiacom.com>
From: Dan Kegel <dkegel AT ixiacom DOT com>
To: Dan Kegel <dkegel AT ixiacom DOT com>,
"''Michael A Chase ' '"
<mchase AT ix DOT netcom DOT com>,
"'''cygwin AT cygwin DOT com' ' '" <cygwin AT cygwin DOT com>
Subject: RE: faq: why doesn't tilde expansion work in shell scripts in cyg
win?
Date: Sat, 24 Aug 2002 21:02:10 -0700
MIME-Version: 1.0

Aha.  I figured it out, and it looks like Cygwin's ash might not be posix
compliant.  Tilde expansion is required by Posix; see
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#tag_
02_06_01

Looking at the source for the ash used in Cygwin, it looks like
tilde expansion is disabled!  The Makefile.am in
http://programming.ccp14.ac.uk/ftp-mirror/programming/cygwin/pub/cygwin/rele
ase/ash/ash-20020731-1-src.tar.bz2
defines SMALL by default, which shuts off tilde expansion.
That would explain my result (though not why tilde works from the
ash commandline; curious).

Am I correct?  It's a little suprising to find Cygwin 
doesn't use a Posix-compliant shell...
- Dan

-----Original Message-----
From: Dan Kegel
To: 'Michael A Chase '; Dan Kegel; ''cygwin AT cygwin DOT com' '
Sent: 24.08.2002 20:20
Subject: RE: faq: why doesn't tilde expansion work in shell scripts in
cygwin?

Say, it says in 
http://www.opengroup.org/onlinepubs/007904975/utilities/xcu_chap02.html#
tag_02_06_01
and
http://www.opengroup.org/onlinepubs/007908799/xcu/chap2.html#tag_001_006
_001
that tilde expansion is required.  Yet ash claims it is posix compliant.
Hrm.  Somebody's wrong somewhere... maybe ash is only compliant to
an outdated posix version?
- Dan

-----Original Message-----
From: Michael A Chase
To: Dan Kegel; 'cygwin AT cygwin DOT com'
Sent: 24.08.2002 19:49
Subject: Re: faq: why doesn't tilde expansion work in shell scripts in
cygwin?

On Sat, 24 Aug 2002 16:01:36 -0700 Dan Kegel <dkegel AT ixiacom DOT com> wrote:

> In all my shell scripts, I'm having to replace ~ with $HOME to
> get them to work under Cygwin.  Seems a bit odd.  Am I doing
> something wrong?  This is with a fairly fresh installation
> of Cygwin on Win2K.

Which shell is being invoked for the scripts?  If it is /bin/sh, ash
doesn't do tilde expansion.
-- 
Mac :})
** I normally forward private questions to the appropriate mail list. **
Ask Smarter: http://www.tuxedo.org/~esr/faqs/smart-questions.html
Give a hobbit a fish and he eats fish for a day.
Give a hobbit a ring and he eats fish for an age.

--
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