Dave Rutherford wrote:
On 10/10/06, mwoehlke <[EMAIL PROTECTED]> wrote:
Completely non-workable. That only works if the bash I want is in
/bin/bash
Well, no. It works as long as the last thing in the path
is 'bash'. It could be /usr/bin/bash, /home/bin/bash,
or yes, /bin/bash. But why the heck don't you know,
if these systems are under your control?
I have root access, but they aren't "my" systems; rampantly changing
them would Not Be Appreciated. And since when does '#! /bin/bash' mean
"use whatever 'bash' you find in $PATH"? Silly me, I thought it meant
"use '/bin/bash'".
I *probably* want '/home/install/gnu/<arch>/bin/bash' (note the
*non-constant* in that path), but not on my desktop. Plus, part of the
goal is for *other* people - who like me also may not have /home/install
(and whose computers I don't have /any/ access to) - to be able to run
the script.
The point is that about the only shebang you can rely on is /bin/sh,
which rarely gets you what you actually *want*. There is almost always
*some* shell at /bin/sh. It is often not the optimal one. Over here, we
have *long* known that shebangs do not make for portable scripts.
Instead I use the current shell, but come up with this little trick to
make sure it's bash.
And why the heck do you think this is is *bug* in *bash*?
Um, did I say I did? I didn't see a not-bugs list, and I'm not the first
one to ask a 'How do I...' question here.
--
Matthew
KDE: Desktop Excellence
_______________________________________________
Bug-bash mailing list
Bug-bash@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-bash