bibi92
asked on
ksh problem
Hello,
When I execute some ksh scripts on a linux server, this error is returned
-ksh: ./expl.ksh: not found [No such file or directory]
How can I resolve this?
Thanks
bibi
When I execute some ksh scripts on a linux server, this error is returned
-ksh: ./expl.ksh: not found [No such file or directory]
How can I resolve this?
Thanks
bibi
If expl.ksh is not in ./ can you supply the full path?
Three things:
First as Ozo suggested, check if it is in your current location by doing
ls -l expl.ksh
Second: make sure that file itself is executable
chmod +x expl.ksh
Third: make sure you have shebang in the first line of expl.ksh
#!/bin/ksh
First as Ozo suggested, check if it is in your current location by doing
ls -l expl.ksh
Second: make sure that file itself is executable
chmod +x expl.ksh
Third: make sure you have shebang in the first line of expl.ksh
#!/bin/ksh
ASKER
ls -l expl.ksh --> ok -rwxrwxrwx 1 oracle dba 18442 Mar 14 11:01
I have done chmod +x expl.ksh
In the first line of expl.ksh : #!/bin/ksh
But same error when I executed the script.
Thanks
bibi
I have done chmod +x expl.ksh
In the first line of expl.ksh : #!/bin/ksh
But same error when I executed the script.
Thanks
bibi
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Is the file unix format?If it is DOS format, you'd normally get "Bad interpreter" messages, but your shell version might not display that bit.
To check, run"od -c expl.ksh" - the text lines displayed should end with a displayed "\n", not with "\r" followed by "\n".
To convert, the easiest way might be to load it up in vi, enter ":set fileformat=unix", press enter, then save the file with ":wq" and press enter.
To check, run"od -c expl.ksh" - the text lines displayed should end with a displayed "\n", not with "\r" followed by "\n".
To convert, the easiest way might be to load it up in vi, enter ":set fileformat=unix", press enter, then save the file with ":wq" and press enter.
ASKER
Thanks, I have created ln -s /bin/ksh /usr/bin/ksh for resolve my problem. Regards