As I have posted in the other question, sometimes it is possible to get the file not found error even when you execute the script as
./scriptname. As I have posted in the other answer, you can test it in your machine.
Now after providing the permissions when I ran the file, it produced the output successfully. Now as discussed over here, I inserted some carriage returns in my file. Now when I ran the script, I was getting the output as,
ksh: ./ksh_experiment.ksh: not found [No such file or directory]
cat -v ksh_experiment.ksh too produced the same output. Also, if I typed
vim ksh_experiment.ksh , a new file was getting opened.
As discussed in the answer of the link that I provided, I removed the carriage returns using the command,
perl -p -i -e "s/\r//g" ksh_experiment.ksh
After fixing when I ran, I got the output as expected.
Now, you can use
dos2unix as well to convert the file.