I'm trying to execute a shell script on OpenBSD 5.7/amd64. Its a test script used to test a FOSS project. (OpenBSD is one of our targets because it provides an ancient compiler out of the box).
When I attempt to run the script:
$ ./cryptest.sh ksh: ./cryptest.sh: No such file or directory
However, if I add -x
for debugging, the script can magically be found:
$ ksh -x ./cryptest.sh + TEST_RESULTS=cryptest-result.txt + ADD_CXXFLAGS= + uname -s + grep -i -c darwin + IS_DARWIN=0 + uname -s + grep -i -c linux + IS_LINUX=0 + uname -s + grep -i -c cygwin + IS_CYGWIN=0 + uname -s + grep -i -c mingw + IS_MINGW=0 + [ -z ] + [ 0 -ne 0 ] + [ 0 -ne 0 ] + [ 0 -ne 0 ] + [ 0 -ne 0 ] + -x c++ -dM -E -std=c++11 - ...
I unpacked the ZIP with -aoq
. I've checked ownership, permissions etc. I ran it through dos2unix
for good measure. I even provided go+rx
to try and run it. All the things I know to check (which are few) appear to be OK.
Can anyone explain what's going on?
head cryptest.sh | cat -vt
. is the interpreter path in the #! line correct?