This is the mail archive of the
mailing list for the Cygwin project.
Re: bash: pushd
Brendan Simon wrote:
> It seems that pushd is not in the path when you run your script.
> Try putting "echo $PATH" in your script to see what the path is set to
> when the script is exectued.
`pushd' is a BASH built-in command, though--not an external programme,
so the value of $PATH shouldn't matter, so long as you're getting
Oh! I've solved it--
Note that, if I do
echo foo > a
`./a' gives `foo: not found'. Also note that *./a is not listed as
If we do this, however:
echo '#!'"$(type -p sh)
" > b
..., then we note that `./b' will actuall run `foo', and spit out
whatever the result of doing so is. We also notice that `ls -l b'
shows b as executable!:)
If you do run into problems with the $PATH or some other variable not
being correctly known by a shell script, use `env', ie: check the
output of this:
echo '#!'"$(type -p env) sh
Direct said output into a file, find that Cygwin recognises the file
as being executable (because of the hashbang), and `pushd foo' (or
whatever else is there) is executed with the current environment,
after `sh' is found in the current PATH.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org