Unix/Linux Go Back    

Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here.

Problem with script: ksh not found

Shell Programming and Scripting

Thread Tools Search this Thread Display Modes
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 ?

Sponsored Links
Old Unix and Linux 03-11-2008
jim mcnamara jim mcnamara is offline Forum Staff  
Join Date: Feb 2004
Last Activity: 16 October 2017, 8:43 PM EDT
Location: NM
Posts: 11,210
Thanks: 567
Thanked 1,107 Times in 1,021 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

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 03:50 AM.