[PLUG] bash question

Denis Heidtmann denis.heidtmann at gmail.com
Fri Apr 2 19:39:07 UTC 2010


On Fri, Apr 2, 2010 at 11:55 AM, Joe Pruett <joey at q7.com> wrote:

> bash 3.2 on my system doesn't show this problem.  are you sure the full
> path and relative path actually get to the same script?  could you be
> accidentally running two different scripts?  or maybe it is some odd
> bash bug, what version do you have?
>

Since /etc/gdm/PostSession/Default is a .sh script, I must use that shell,
also known as dash.  Maybe bash will not show the problem.  I have version
3.2.48(1)-release (x86_64-pc-linux-gnu).

-Denis


>
> On 04/02/2010 11:44 AM, Denis Heidtmann wrote:
> > I have a very simple bash script which wants an argument.  I would like
> to
> > source it.  I find that if I source it from another script using its
> > relative path it works fine--the argument is received.  If I source it
> using
> > its full path no argument is received.  A simple test is:
> >
> > script1.sh:
> > #! /bin/sh
> > echo "Argument = $@"
> >
> > script2.sh:
> > #!/bin/sh
> > .<full path>/script1.sh full
> > .<relative path>/script1.sh relative
> >
> > The result show no argument received in the full case.
> >
> > Ideas?
>
>



More information about the PLUG mailing list