[sudo-users] sudo, ksh, $0 - interesting behavior
kevinshortt at gmail.com
Thu Aug 4 11:46:01 EDT 2011
I have an interesting issue. $0 in a ksh script is scrubbed and sets
differently when using sudo and symlinks for the executed script.
Here is a copy of the test script, and an example of the behavior.
I am still investigating, but thought I would ask the group if they have
experienced this before.
echo "$ 0:[$0]";
serverA:$ ls -ld test.sh
-rwx------ 1 kevinshortt staff 29 Aug 4 11:40 test.sh ->
serverA:$ sudo ./test.sh
More information about the sudo-users