4
1
In Ubuntu Lucid Lynx, I'm trying to do
su -l user -c "foo.sh args"
where foo.sh
is an executable bash script on the PATH
set in ~user/.bashrc
. Unfortunately, this fails because it can't find foo.sh
. If I su -l user
and manually type foo.sh args
at the command line, it works fine. The PATH augmentation is done in ~user/.bashrc
and appears to work whether or not I su
with -l
interactively, but it doesn't appear to work when I specify the command.
Any idea why this is, and how I can get around that?