View Single Post
Old Nov 16th, 2006, 3:01 AM   #2
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 4 Arevos is on a distinguished road
It's called a shebang. It's the *nix way of determining what interpreter to use when executing a shell script. The operating system looks for the shebang at the start of the script its executing, and then passes the entire contents of the file to the program specified by the shebang. Any additional arguments are appended to the end of the program.

For instance, say I have a file called hello.fb:
#! /usr/bin/foobar -y
All of this text as well as the line above
is passed to "foobar -y" as STDIN
Then this line:
./hello.fb world
Is the same as:
/usr/bin/foobar -y world < hello.fb
Arevos is offline   Reply With Quote