/bin/ksh: bad interpreter: No such file or directory
Hi,
I use the RH Linux and the bash shell. I got a ksh script from my partner. As I run this script I got error as follow: Code:
-bash: ./compileExample: /bin/ksh: bad interpreter: No such file or directory Regards |
Does your file have DOS-style line endings? Convert with dos2unix.
|
Check whether you've ksh shell installed or not, as:-
Code:
~$ which ksh Code:
#!/bin/ksh |
Quote:
|
Quote:
Code:
/usr/bin/which: no ksh in (/usr/local/bin:/bin:/usr/bin:/home/msg61/bin) Code:
#!/bin/ksh |
And here is the script:
Code:
#!/bin/ksh |
This is a ksh script. To interpret it you need ksh. You may be able to run it with bash if you replace the ksh in the first line, but I can't say if it will work as intended. The easiest way would be to just install ksh.
|
Installing ksh would usually be done with a package manager: "sudo zypper install pdksh" or similar.
|
Assuming 'RH Linux' means RHEL, use
Code:
yum install ksh |
All times are GMT -5. The time now is 06:07 PM. |