Zitat von
endy66
Da bekomme ich leider "Datei oder Verzeichnis nicht gefunden".
Dann machst Du was falsch:
Code:
ls /tmp/foo/ -R
/tmp/foo/:
bar foo.sh
/tmp/foo/bar:
bar.sh
cat /tmp/foo/foo.sh
#!/bin/bash
echo "this is $0"
`dirname $0`/bar/bar.sh
exit 0
cat /tmp/foo/bar/bar.sh
echo "and this is $0"
exit 0
/tmp/foo/foo.sh
this is /tmp/foo/foo.sh
and this is /tmp/foo/bar/bar.sh
Works for me (tm).
//Edit.
Funtioniert auch über $PATH (why not?).
Code:
# cp /tmp/foo/* -r /usr/local/bin
# foo.sh
this is /usr/local/bin/foo.sh
and this is /usr/local/bin/bar/bar.sh
Lesezeichen