Dean K. Gibson wrote:
> In GNU Bash-2.05b (Fedora Core 1), I observe the following behaviour:
> 
> If bash script A is invoked (via "source") with command line parameters,
> and bash script A invokes (via "source") bash script B with NO
> parameters specified, then the parameters specified for A are passed to
> B (rather than what I would have thought would be the expected
> behaviour, that script B is called with NO parameters).

It's expected behavior.  `.' works just as if all of the commands
in the file were directly executed by the calling shell, which means
that everything is inherited, including the positional parameters.

It's a bash extension that allows additional arguments to `.' to be
temporarily treated as positional parameters.  The behavior with no
additional arguments is backwards compatible.

Chet
-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet )
                                                Live...Laugh...Love
Chet Ramey, ITS, CWRU    [EMAIL PROTECTED]    http://cnswww.cns.cwru.edu/~chet/


_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash

Reply via email to