![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| how to execute a batch script from shell script | lakshmis10 | Shell Programming and Scripting | 1 | 10-17-2007 09:43 AM |
| execute script | tonet | Shell Programming and Scripting | 1 | 10-17-2007 03:01 AM |
| script execute or no execute | Kespinoza97 | Shell Programming and Scripting | 4 | 06-23-2007 06:27 AM |
| Is it possible to execute shell script with PHP? | Micz | Shell Programming and Scripting | 1 | 05-27-2004 08:52 AM |
| execute a script | tinydejong | UNIX for Dummies Questions & Answers | 2 | 07-07-2002 11:44 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Can't execute a script
I have a script with a .sh extension. When I try to run it from the command line using: test.sh ,I get this message: ksh: test.sh: not found
How do I run this? |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
check whether the path where the script is available is with env var $PATH
check if the script is executable run it as ./test.sh in the current path itself if you dont want to edit the $PATH var |
|
#3
|
|||
|
|||
|
Check the working directory
if test.sh don't have execute permissions
it will give error ksh: test.sh: cannot execute but u r getting error canno found. U check current working directory by pwd then check where the file test.sh exists. Include the path of test.sh directory in PATH of ur profile. |
|
#4
|
|||
|
|||
|
you probably have ^M chars in the file.
do a cat -vets and if so dos2unix |
|||
| Google The UNIX and Linux Forums |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|