5 echo before execscript.sub: "$@"
6 echo calling execscript.sub
7 ./execscript.sub aa bb cc dd ee
8 echo after execscript.sub with args: $?
10 echo after execscript.sub without args: $?
12 # set up a fixed path so we know notthere will not be found
13 PATH=/usr/bin:/bin:/usr/local/bin:
19 # this is iffy, since the error messages may vary from system to system
23 # /bin/sh should be there on all systems
27 # try executing a directory
34 # try sourcing a directory
38 . ${THIS_SH} 2>/dev/null
44 # kill two birds with one test -- test out the BASH_ENV code
45 echo echo this is bashenv > /tmp/bashenv
46 export BASH_ENV=/tmp/bashenv
47 ${THIS_SH} ./execscript.sub3
51 # we're resetting the $PATH to empty, so this should be last
63 # but -p should guarantee that we find all the standard utilities, even
64 # with an empty or unset $PATH
65 command -p sh -c 'echo this is $0'
67 command -p sh -c 'echo this is $0'
69 # a bug in bash before bash-2.01 caused PATH to be set to the empty string
70 # when command -p was run with PATH unset
73 echo "echo ok" | ${THIS_SH} -t
75 ${THIS_SH} ./execscript.sub2
78 ${THIS_SH} ./execscript.sub4