![]() |
|
|
|
|
|||||||
| 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 |
| shell script to search content of file with timestamps in the directory | psychobeauty | Shell Programming and Scripting | 10 | 04-21-2008 02:37 AM |
| Executing Multiple .SQL Files from Single Shell Script file | anushilrai | Shell Programming and Scripting | 3 | 04-07-2008 07:09 AM |
| Reading file names from a file and executing the relative file from shell script | anushilrai | Shell Programming and Scripting | 4 | 03-10-2006 02:25 AM |
| general question on executing file in drwx--x--x directory | cul8erppl | Shell Programming and Scripting | 2 | 07-20-2005 01:19 AM |
| Shell script is not executing | dreams5617 | UNIX for Advanced & Expert Users | 5 | 08-20-2004 08:45 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
getting : No such file or directory while executing a shell script
Hi all,
I am getting : No such file or directory while executing a shell script. But i have that corresponding file in the corresponding path. It also have executable rights. Please help me out in this Thanks in advance. Ananthi.U |
| Forum Sponsor | ||
|
|
|
#2
|
|||
|
|||
|
Have you make your script executable with chmod?
Have you start your script with /directory/scriptname or ./scriptname? Regards |
|
#3
|
|||
|
|||
|
sorry i couldnt get u
|
|
#4
|
|||
|
|||
|
re: help
well i guess u created a script by using cat or the vi editor ..after that u need to change the permission of the script using chmod 777 filename ..since its a script u need to make it a executable ..after that u could run the script sh filename.sh ...or simply ./filename..both will work ..i guess this was what the previous person was trying to explain
|
|
#5
|
|||
|
|||
|
re:
and he was trying to explain that have u created the script in the correct directory? or are u giving the whole path while running the script.
PS. correct me if i am wrong . |
|
#6
|
|||
|
|||
|
Also if you donn wan to use it like "./filename" then you need to put your script file in $HOME/bin ... if it exists and included in $PATH, or else create bin in $HOME or anywhere u like and also .. export the same to the $PATH.
eg. export PATH=$PATH:$HOME/bin then use it as "filename". |
|
#7
|
|||
|
|||
|
You need to copy your scripts file to $HOME/bin
|
|||
| Google The UNIX and Linux Forums |