2 # Non-POSIX trickery that is widely supported,
3 # used by https://justine.lol/ape.html
5 T=`mktemp -d "${TMPDIR:-/tmp}/sh-test.XXXXXXXX"` || exit
7 printf "MZqFpD='\n\0'\n#'\"\necho this is a test\n" >"$T/testshellproc"
8 chmod 755 "$T/testshellproc"
10 [ "`testshellproc`" = "this is a test" ]