I'm under
Linux version 3.3.4-5.fc17.x86_64 ([email protected]) (gcc version 4.7.0 20120504 (Red Hat 4.7.0-4) (GCC) ) #1 SMP Mon May 7 17:29:34 UTC 2012
trying to run a basic executable script.ksh file with permission 775 and containing:
#!/bin/ksh
echo "hello ya"
but I have:
$./script.ksh
./script.ksh: Exec format error. Binary file not executable.
the problem looks like to come from the shebang but I can't figure out why and how. I can run the script by doing this (note the weird output for the first line):
$ ksh script.ksh
script.ksh[1]: ?o?;??#!/bin/ksh: not found [No such file or directory]
hello ya
some (maybe) useful output:
$ file script.ksh
script.ksh: Korn shell script, UTF-8 Unicode (with BOM) text executable
$ which ksh
/bin/ksh
do you have an idea?