Sourcing with dot gives "not found" on Ubuntu 7.10 only
am 30.01.2008 17:57:17 von Michael B Allen
I have been using the following for a while with no problems:
#!/bin/sh
if [ -f _tailscript ]; then
. _tailscript
fi
But when I run this on the latest version of Ubuntu 7.10 LTS I suddenly
get an error:
# ./install
.: 9: _tailscript: not found
# file /bin/sh
/bin/sh: symbolic link to `dash'
If I source on my bash commandline it works:
# . _tailscript
Success
Can anyone tell what the problem is?
Mike
Re: Sourcing with dot gives "not found" on Ubuntu 7.10 only
am 30.01.2008 18:34:46 von Icarus Sparry
On Wed, 30 Jan 2008 16:57:17 +0000, Michael B Allen wrote:
> I have been using the following for a while with no problems:
>
> #!/bin/sh
>
> if [ -f _tailscript ]; then
> . _tailscript
> fi
>
> But when I run this on the latest version of Ubuntu 7.10 LTS I suddenly
> get an error:
>
> # ./install
> .: 9: _tailscript: not found
>
> # file /bin/sh
> /bin/sh: symbolic link to `dash'
>
> If I source on my bash commandline it works:
>
> # . _tailscript
> Success
>
> Can anyone tell what the problem is?
>
> Mike
Try ". ./_tailscript". You probably (thankfully) don't have "." in your
PATH.
GNU make has problems with it canonicalising filenames, in exactly this
case. nmake has an operator to get around this problem.
Re: Sourcing with dot gives "not found" on Ubuntu 7.10 only
am 30.01.2008 18:43:43 von Michael B Allen
On 30 Jan 2008 17:34:46 GMT
Icarus Sparry wrote:
> On Wed, 30 Jan 2008 16:57:17 +0000, Michael B Allen wrote:
>
> > I have been using the following for a while with no problems:
> >
> > #!/bin/sh
> >
> > if [ -f _tailscript ]; then
> > . _tailscript
> > fi
> >
> > But when I run this on the latest version of Ubuntu 7.10 LTS I suddenly
> > get an error:
> >
> > # ./install
> > .: 9: _tailscript: not found
> >
> > # file /bin/sh
> > /bin/sh: symbolic link to `dash'
> >
> > If I source on my bash commandline it works:
> >
> > # . _tailscript
> > Success
> >
> > Can anyone tell what the problem is?
> >
> > Mike
>
> Try ". ./_tailscript". You probably (thankfully) don't have "." in your
> PATH.
>
> GNU make has problems with it canonicalising filenames, in exactly this
> case. nmake has an operator to get around this problem.
Works like a champ.
Thanks,
Mike