Unix/Linux Go Back    


Shell Programming and Scripting Unix shell scripting - KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and shell scripts and shell scripting languages here.

Problem with script: ksh not found

Shell Programming and Scripting


Closed Linux or Unix Question    
 
Thread Tools Search this Thread Display Modes
    #1  
Old Unix and Linux 03-11-2008
midhun_u midhun_u is offline
Registered User
 
Join Date: Jul 2006
Last Activity: 24 July 2008, 6:36 PM EDT
Location: Paris, France
Posts: 8
Thanks: 0
Thanked 0 Times in 0 Posts
Problem with script: ksh not found

Hello Guys,

what is the significance of using #!/bin/sh at the start of shell script.

my default shell is ksh, when i run my script i have ksh: not found error
and when i use ./myscript it works.

Can anyone explain me the problem please ?

tnx
Sponsored Links
    #2  
Old Unix and Linux 03-11-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
 
Join Date: Feb 2004
Last Activity: 4 August 2015, 10:14 PM EDT
Location: NM
Posts: 10,508
Thanks: 348
Thanked 874 Times in 812 Posts
There is a FAQ on #! at the top of a file. It is a "magic" number that opens /bin/sh as the shell.

Not found - means it cannot open ksh Try #!/bin/ksh
Sponsored Links
Closed Linux or Unix Question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Linux More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Crobjob Script to Email if Problem Found SkySmart Shell Programming and Scripting 2 07-26-2010 03:56 AM
E3500 Harddisk not found problem (First time user) Harmut Solaris 2 06-19-2009 10:28 AM
Scripting problem - when the file is not found i want it to return to the menu Alendrin Shell Programming and Scripting 2 03-04-2009 12:25 PM
No screens found problem - and I cant use keybord properly to solve!! olddays UNIX for Dummies Questions & Answers 1 10-23-2007 07:45 PM
Problem MAKE cc: not found on AIX 5.3 please help me... touny AIX 1 07-26-2005 10:09 AM



All times are GMT -4. The time now is 04:26 AM.