This is the mail archive of the cygwin@sourceware.cygnus.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index] [Subject Index] [Author Index] [Thread Index]
Shell bug - no args for sourced scripts
- To: cygwin@sourceware.cygnus.com
- Subject: Shell bug - no args for sourced scripts
- From: Luke Kendall <luke@research.canon.com.au>
- Date: Wed, 10 Feb 1999 13:52:50 +1100
- Delivered-To: listarch-cygwin@sourceware.cygnus.com
- Delivered-To: mailing list cygwin@sourceware.cygnus.com
- Mailing-List: contact cygwin-help@sourceware.cygnus.com; run by ezmlm
- Sender: cygwin-owner@sourceware.cygnus.com
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@sourceware.cygnus.com