13,420
edits
Changes
→Creating & Executing Shell Scripts
'''Using a Shebang Line'''
[[Image:shebang.png|thumb|right|200px|The '''shebang line''' <u>must</u> appear on the '''first line''' and at the '''beginning''' of the shell script.]]Since Linux shells have evolved over a period of time, using a she-bang line '''forces ''' the shell script<br>to run in a '''specific shell''', which could prevent errors in case an older shell does not recognize newer features from more recent shells.<br><br>
The she-bang line is a special comment at top of your shell script to run your shell script in that specific shell.<br><br>
The '''shebang line''' <u>must</u> appear on the '''first line''' and at the '''beginning''' of the shell script,<br>otherwise, it will be treated as a regular comment and ignored.<br><br>