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
problem with shell script execution anju Shell Programming and Scripting 2 05-08-2008 01:50 AM
Questions on shell execution stevefox Shell Programming and Scripting 6 11-20-2007 04:06 AM
Scripts fails if you change its code during the execution. Klashxx Shell Programming and Scripting 4 07-04-2007 06:43 AM
Scripts execution aladdin UNIX for Dummies Questions & Answers 9 01-11-2007 03:08 PM
execution of shell script malaymaru Shell Programming and Scripting 5 06-13-2005 09:49 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 09-18-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
Please help on shell scripts execution

I have already posted the question. Because previous post has sinked so that I have to ask the question again. I created the script and chmod it as 755. The ksh shell is in bin. Now I typed ./script_name.ksh to execute the script in the directory of that script. The return message was: Ksh: ./script_name.ksh: Not found. What does this mean? I typed script name correctly. I am really confused by this. Anyone could give ma a hand? Thanks a lot.

Also, another question for execution permission: if a folder's permission show like: drwxr-sr-x, what is group's r-s, The user's rwx=7, other's r-x=5, I couldn't find what is group's r-s. Please advise. Thanks again.

Last edited by duke0001; 09-18-2006 at 12:40 PM..
  #2 (permalink)  
Old 09-18-2006
aigles's Avatar
aigles aigles is offline Forum Advisor  
Registered User
  
 

Join Date: Apr 2004
Location: Bordeaux, France
Posts: 1,416
Try with the the following in line 1 of your script :
Code:
#! /bin/ksh
Jean-Pierre.
  #3 (permalink)  
Old 09-18-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
Yes, #! /bin/ksh is on the top of the script.
  #4 (permalink)  
Old 09-19-2006
Andrek Andrek is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 122
Have you looked to see if there are hidden characters in your script name?
You could check by doing somthing like

#ls | cat -v

If you see odd stuff in your name then that could be why?
  #5 (permalink)  
Old 09-19-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Make absolutely sure that the /bin/ksh or the /usr/bin/ksh file exists and that you are referring to the correct file in your script. This error is what is encountered when the interpreter is not found.

As for your question about the directory permissions, please go through the tutorials. Perderabo has written an excellent tutorial on file permissions.
  #6 (permalink)  
Old 09-19-2006
duke0001 duke0001 is offline
Registered User
  
 

Join Date: Nov 2005
Posts: 131
Andrek and blowtorch:

Thanks so much for your advice. I followed to check script name and ksh files in /bin/ksh and in /usr/bin/ksh. ksh files exist in these directories and script name has no hidden characters. Then I tried to kick it off. It still told me 'Not found'. Why do I check ksh files existing? Do I need to register my script in these ksh files or something else? I am confused by this. Any idea?
  #7 (permalink)  
Old 09-19-2006
blowtorch's Avatar
blowtorch blowtorch is offline Forum Advisor  
Supporter
  
 

Join Date: Dec 2004
Location: Singapore
Posts: 2,350
Can you post the script? Atleast the first 15 or so lines? And also, post the output of 'ls -ld /usr/bin/ksh /bin/ksh /bin /usr/bin'.
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 02:43 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