[NBLUG/talk] bashed

Dustin Mollo dustin at sonic.net
Fri Oct 24 13:45:01 PDT 2003


On Fri, Oct 24, 2003 at 12:14:35PM -0700, Steve wrote:
> I think you need to imply the path, most systems dont have the CD rom in
> their path..  so 
> bash ./setup
> 
> should work

yes, that will work as well, but is simply being more explicit and exact,
rather than fixing a path problem.

yes - the current working directory may not be in your path, but bash most
likely is...and 'setup' is simply an argument to bash, which, in this type
of situation, will mean bash will look in your current working directory for
a file called setup which it will try to run.

another way of saying it: assuming pwd isn't in your path, you only need
to prepend './' to a command that you want to execute, and not for a
filename that is an argument to a command.  most commands you'll work with
assume that the file you've specified as an option is in your current
working directory, and if they don't, they usually document that somewhere
(man page, help output, etc.)

also something to take note of - there appears to be some confusion that
it's bash's fault that you can't execute the file.  that is incorrect.  bash
has nothing to do with whether or not you can execute the program.  yes, the
permission problem was reported by bash, because bash tried to execute the
program for you, but bash is the wrong tree to be barking up in terms of
fixing the permissions problem (ie, you can't configure bash to fix the
problem.) the man page you'd want to read is chmod - that's the program that
actually tweaks the permissions bits on a file (as already pointed out by
Mark and Scott.)

hope that helps...

-dustin



More information about the talk mailing list