The UNIX and Linux Forums  


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 Scripts kwliew999 AIX 7 06-12-2007 09:06 PM
SQL and shell scripts Amruta Pitkar UNIX for Dummies Questions & Answers 3 08-24-2006 04:51 AM
Help With Shell Scripts ragha81 Shell Programming and Scripting 6 08-18-2006 09:57 PM
Need Help With Shell scripts holler1 Shell Programming and Scripting 2 07-31-2006 03:43 AM
Difference between writing Unix Shell script and AIX Shell Scripts haroonec AIX 0 04-12-2006 03:27 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-01-2006
sumesh.abraham
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Using #! /bin/sh in Shell scripts

Hi All,

What does #! /bin/sh mean in a shell script? Is it mandatory to include in a shell script? I'm able to execute the shell script without it.

Any help on this would be appreciated.
  #2 (permalink)  
Old 12-01-2006
sysgate's Avatar
sysgate sysgate is offline Forum Advisor  
Unix based
  
 

Join Date: Nov 2006
Location: Bulgaria
Posts: 1,323
it actually tells the script to which interpreter to refer. As you know, bash shell has some specific functions that other shell does not have and vice-versa. Same way is for perl, python and other languages.
  #3 (permalink)  
Old 12-01-2006
sumesh.abraham
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Thanks for the info. I still have doubts. If this information is not provided, how the path of the interpreter is assumed?
  #4 (permalink)  
Old 12-01-2006
vino's Avatar
vino vino is offline Forum Staff  
Supporter (in vino veritas)
  
 

Join Date: Feb 2005
Location: Bangalore, India
Posts: 2,798
Do people ever read the FAQ's or even use the search feature ?

See What does "#! /usr/bin/ksh" mean?
  #5 (permalink)  
Old 12-01-2006
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
  
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
Right. You should do what vino says before asking. Anyway, If you don't specify that information, the user's default shell will be used.
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:09 PM.


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