-ksh: revenue_ext.ksh: not found [No such file or directory]
Clash Royale CLAN TAG#URR8PPP
up vote
5
down vote
favorite
I am getting the same not found [No such file or directory]
error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./
in the posts here and here and tried but no luck. The script does exist under the directory from where I am trying to execute and has full permissions but gives the same error when run directly or with a ./
. The first line within the script also has #!/usr/bin/ksh
The error message is like below:
-ksh: revenue_ext.ksh: not found [No such file or directory]
However, other ksh
scripts under the same directory run fine so am absolutely clueless about what could be wrong here. Any help would be greatly appreciated
shell-script ksh executable
add a comment |Â
up vote
5
down vote
favorite
I am getting the same not found [No such file or directory]
error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./
in the posts here and here and tried but no luck. The script does exist under the directory from where I am trying to execute and has full permissions but gives the same error when run directly or with a ./
. The first line within the script also has #!/usr/bin/ksh
The error message is like below:
-ksh: revenue_ext.ksh: not found [No such file or directory]
However, other ksh
scripts under the same directory run fine so am absolutely clueless about what could be wrong here. Any help would be greatly appreciated
shell-script ksh executable
What is the output ofcat -v revenue_ext.ksh
?
â Ramesh
Jun 5 '14 at 4:00
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18
add a comment |Â
up vote
5
down vote
favorite
up vote
5
down vote
favorite
I am getting the same not found [No such file or directory]
error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./
in the posts here and here and tried but no luck. The script does exist under the directory from where I am trying to execute and has full permissions but gives the same error when run directly or with a ./
. The first line within the script also has #!/usr/bin/ksh
The error message is like below:
-ksh: revenue_ext.ksh: not found [No such file or directory]
However, other ksh
scripts under the same directory run fine so am absolutely clueless about what could be wrong here. Any help would be greatly appreciated
shell-script ksh executable
I am getting the same not found [No such file or directory]
error when trying to execute a ksh script. Read tips about the PATH and running the script with a ./
in the posts here and here and tried but no luck. The script does exist under the directory from where I am trying to execute and has full permissions but gives the same error when run directly or with a ./
. The first line within the script also has #!/usr/bin/ksh
The error message is like below:
-ksh: revenue_ext.ksh: not found [No such file or directory]
However, other ksh
scripts under the same directory run fine so am absolutely clueless about what could be wrong here. Any help would be greatly appreciated
shell-script ksh executable
shell-script ksh executable
edited Apr 13 '17 at 12:36
Communityâ¦
1
1
asked Jun 5 '14 at 3:51
user68112
33126
33126
What is the output ofcat -v revenue_ext.ksh
?
â Ramesh
Jun 5 '14 at 4:00
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18
add a comment |Â
What is the output ofcat -v revenue_ext.ksh
?
â Ramesh
Jun 5 '14 at 4:00
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18
What is the output of
cat -v revenue_ext.ksh
?â Ramesh
Jun 5 '14 at 4:00
What is the output of
cat -v revenue_ext.ksh
?â Ramesh
Jun 5 '14 at 4:00
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18
add a comment |Â
3 Answers
3
active
oldest
votes
up vote
7
down vote
accepted
I believe there may be some carriage returns causing this error here. I was able to reproduce the error successfully.
Testing
cat ksh_experiment.ksh
#!/usr/bin/ksh
echo "Hello"
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]
Now, 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.
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
add a comment |Â
up vote
0
down vote
In my case, I had this same error message come up if the file is either .ksh or .sh like this:
-ksh: ./somefile.sh: not found [No such file or directory]
Turns out its the access issue.
Even though you make this file executable, on the server you might need admin rights to run. I could run command line, but executing the script would return not found, try run the script in sudo, then you will know if you are allowed to run the script as root or not. Hope it helps.
add a comment |Â
up vote
0
down vote
Please have a look on i have the same issue, since i have sh file error!!!
ksh: rms_biweekly_pid.sh: not found.
New contributor
add a comment |Â
3 Answers
3
active
oldest
votes
3 Answers
3
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
I believe there may be some carriage returns causing this error here. I was able to reproduce the error successfully.
Testing
cat ksh_experiment.ksh
#!/usr/bin/ksh
echo "Hello"
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]
Now, 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.
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
add a comment |Â
up vote
7
down vote
accepted
I believe there may be some carriage returns causing this error here. I was able to reproduce the error successfully.
Testing
cat ksh_experiment.ksh
#!/usr/bin/ksh
echo "Hello"
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]
Now, 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.
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
add a comment |Â
up vote
7
down vote
accepted
up vote
7
down vote
accepted
I believe there may be some carriage returns causing this error here. I was able to reproduce the error successfully.
Testing
cat ksh_experiment.ksh
#!/usr/bin/ksh
echo "Hello"
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]
Now, 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.
I believe there may be some carriage returns causing this error here. I was able to reproduce the error successfully.
Testing
cat ksh_experiment.ksh
#!/usr/bin/ksh
echo "Hello"
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]
Now, 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.
edited May 23 '17 at 12:40
Communityâ¦
1
1
answered Jun 5 '14 at 4:05
Ramesh
22.6k31100179
22.6k31100179
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
add a comment |Â
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
Yes you are right.There were ^M characters within the file that were not easily visible to the naked eye. Gave dos2unix revenue_ext.ksh and it worked:)
â user68112
Jun 5 '14 at 5:14
add a comment |Â
up vote
0
down vote
In my case, I had this same error message come up if the file is either .ksh or .sh like this:
-ksh: ./somefile.sh: not found [No such file or directory]
Turns out its the access issue.
Even though you make this file executable, on the server you might need admin rights to run. I could run command line, but executing the script would return not found, try run the script in sudo, then you will know if you are allowed to run the script as root or not. Hope it helps.
add a comment |Â
up vote
0
down vote
In my case, I had this same error message come up if the file is either .ksh or .sh like this:
-ksh: ./somefile.sh: not found [No such file or directory]
Turns out its the access issue.
Even though you make this file executable, on the server you might need admin rights to run. I could run command line, but executing the script would return not found, try run the script in sudo, then you will know if you are allowed to run the script as root or not. Hope it helps.
add a comment |Â
up vote
0
down vote
up vote
0
down vote
In my case, I had this same error message come up if the file is either .ksh or .sh like this:
-ksh: ./somefile.sh: not found [No such file or directory]
Turns out its the access issue.
Even though you make this file executable, on the server you might need admin rights to run. I could run command line, but executing the script would return not found, try run the script in sudo, then you will know if you are allowed to run the script as root or not. Hope it helps.
In my case, I had this same error message come up if the file is either .ksh or .sh like this:
-ksh: ./somefile.sh: not found [No such file or directory]
Turns out its the access issue.
Even though you make this file executable, on the server you might need admin rights to run. I could run command line, but executing the script would return not found, try run the script in sudo, then you will know if you are allowed to run the script as root or not. Hope it helps.
edited Apr 27 '17 at 18:10
Thomas
3,69141225
3,69141225
answered Apr 27 '17 at 17:29
Ajay. A
11
11
add a comment |Â
add a comment |Â
up vote
0
down vote
Please have a look on i have the same issue, since i have sh file error!!!
ksh: rms_biweekly_pid.sh: not found.
New contributor
add a comment |Â
up vote
0
down vote
Please have a look on i have the same issue, since i have sh file error!!!
ksh: rms_biweekly_pid.sh: not found.
New contributor
add a comment |Â
up vote
0
down vote
up vote
0
down vote
Please have a look on i have the same issue, since i have sh file error!!!
ksh: rms_biweekly_pid.sh: not found.
New contributor
Please have a look on i have the same issue, since i have sh file error!!!
ksh: rms_biweekly_pid.sh: not found.
New contributor
New contributor
answered 7 mins ago
DEEPAK PATRA
1
1
New contributor
New contributor
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f134581%2fksh-revenue-ext-ksh-not-found-no-such-file-or-directory%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
What is the output of
cat -v revenue_ext.ksh
?â Ramesh
Jun 5 '14 at 4:00
If you have moved this file from windows to unix Then run dos2unix filename filename command
â sonal
May 31 '16 at 8:18