Hi,
What is the expected result of the following script?
#! /bin/bash -
export PATH=/tmp/
echo $0
exit 0
Then, put this file to /tmp/.
cd / and run
PATH=/tmp/ script.sh
In some Linux, it will print "/tmp/script.sh", while in other, it will
print "script.sh" only. Which is wrong? If both are fine, is there any
better way to make it portable?
Qian