delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/02/10/02:18:16

Delivered-To: listarch-cygwin AT sourceware DOT cygnus DOT com
Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm
Sender: cygwin-owner AT sourceware DOT cygnus DOT com
Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com
Message-ID: <36C0F482.E7ED2ADF@research.canon.com.au>
Date: Wed, 10 Feb 1999 13:52:50 +1100
From: Luke Kendall <luke AT research DOT canon DOT com DOT au>
X-Mailer: Mozilla 4.06 [en] (WinNT; I)
MIME-Version: 1.0
To: cygwin AT sourceware DOT cygnus DOT com
Subject: Shell bug - no args for sourced scripts

If you write a script that is designed to set up variables,
for sourcing in another shell, Cygwin B20.1 sh under NT4.0 ignores
any parameters passed.

This differs from Korn shells and bash version 2.01 under Solaris.

E.g. the script "sourcing":

#!/bin/sh
echo "Args are: $@"
ARGS="$@" export ARGS

When run under Cygnus shell like so:

	. ./sourcing test

demonstrates that the arguments are not seen in the sourced
shell script.

	Args are: 

Likewise, $# is 0.

luke

--   
Want to unsubscribe from this list?                             
Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com


- Raw text -


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