The time now is Sat 25 May 2013, 08:49
All times are UTC - 4 |
| Author |
Message |
kethd
Joined: 20 Oct 2005 Posts: 451 Location: Boston MA USA
|
Posted: Sat 03 Dec 2005, 23:37 Post subject:
In Linux, SheBang (= #!) denotes executable script file |
|
SheBang = #!
(also called hash-bang)
special code at beginning of executable script text files
ShellScripts
See also: FileTypeAssociation
ash
bash
http://www.halley.cc/ed/linux/newcomer/shebang.html?
The Whole Shebang, or What's in a Script
A shell script is merely a list of commands to be executed in the proper order by a shell environment like bash. A shell script can do anything that you could type manually. Conversely, you could type anything that a shell script contained, to do the same tasks manually.
There are many shell script interpreters, and some that are not even intended for use as an interactive command prompting space for users to type their commands. For example, Perl scripts may start with a shebang line similar to #!/usr/local/bin/perl. They're still interpreted by that process and any code within is executed on behalf of the user who invoked the command.
Also, note that the filename has nothing to do with the type of shell required for running the script. The script could have been called sample, or sample.pl or even kernel.exe. In Unix and Linux, it is the contents (such as its shebang), and not the name, which determines how the system will go about executing or opening the file. Many of the commands you run in Linux are just shell scripts that have no filename extensions.
Some helpful manual pages on your Linux system may be (help source), (man bash), (man chmod), and (man perl).
Some helpful google searches may be linux shell commands scripts, linux shebang notation, linux bash PATH variable, linux file mode permissions, and common scripting languages.
|
|
Back to top
|
|
 |
Flash
Official Dog Handler

Joined: 04 May 2005 Posts: 9850 Location: Arizona USA
|
Posted: Sun 04 Dec 2005, 11:58 Post subject:
|
|
Would whoever moved this to the Howto section please explain why? It doesn't seem to me that it belongs here.
|
|
Back to top
|
|
 |
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum You cannot attach files in this forum You can download files in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|