Forum Moderators: coopster
Thanks aktell
For example, if you have a script that dumps your logfiles into a database, you might want to run that script automatically each evening by executing it as a cronjob. Since you wouldn't be starting up a web browser and accessing the script (Apache), but rather telling your system to run the script under the shell, the shell would need to know where to find the appropriate program it needs to execute the script.
Apache knows, and doesn't need the line.
The shell does not know, and so it needs the line.
(also called a "bang" or "shebang")