The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers > Answers to Frequently Asked Questions
Google UNIX.COM



View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
  #5 (permalink)  
Old 07-12-2002
killerserv's Avatar
killerserv killerserv is offline
Unix Predator
 

Join Date: Dec 2000
Location: Phoenix, AZ
Posts: 670
On the first line of an interpreter script, the "#!", is the name of a program which should be used to interpret the contents of the file. For instance, if the first line contains "#! /bin/sh", then the contents of the file are executed as a shell script.

You can get away without this, but you shouldn't. All good scripts state the interpretor explicitly. The '!' is also known as intepreter for the script to recognise correct compiler to be used.