The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
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 05:37 AM
Executing Multiple .SQL Files from Single Shell Script file anushilrai Shell Programming and Scripting 3 04-07-2008 10: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 05:25 AM
general question on executing file in drwx--x--x directory cul8erppl Shell Programming and Scripting 2 07-20-2005 04:19 AM
Shell script is not executing dreams5617 UNIX for Advanced & Expert Users 5 08-20-2004 11:45 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-10-2008
ananthi_ku ananthi_ku is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 12
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
  #2 (permalink)  
Old 10-10-2008
Franklin52 Franklin52 is offline Forum Staff  
Moderator
  
 

Join Date: Feb 2007
Posts: 4,291
Have you make your script executable with chmod?
Have you start your script with /directory/scriptname or ./scriptname?

Regards
  #3 (permalink)  
Old 10-10-2008
ananthi_ku ananthi_ku is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 12
sorry i couldnt get u
  #4 (permalink)  
Old 10-10-2008
tarunicon's Avatar
tarunicon tarunicon is offline
Registered User
  
 

Join Date: Oct 2008
Location: INDIA
Posts: 25
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 (permalink)  
Old 10-10-2008
tarunicon's Avatar
tarunicon tarunicon is offline
Registered User
  
 

Join Date: Oct 2008
Location: INDIA
Posts: 25
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 (permalink)  
Old 10-10-2008
vivek.gkp vivek.gkp is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 11
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 (permalink)  
Old 10-10-2008
vivek.gkp vivek.gkp is offline
Registered User
  
 

Join Date: Oct 2008
Posts: 11
You need to copy your scripts file to $HOME/bin
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:27 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0