Changes

Jump to: navigation, search

Tutorial10: Shell Scripting - Part 1

475 bytes removed, 10:25, 10 March 2021
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.]]If you are learning Bash scripting by reading other people’s code you might have noticed<br>that the first line in the scripts starts with the <span style="font-family:courier;font-weight:bold">#!</span> characters and the path to the Bash interpreter. <i>This sequence of characters (#!) is called '''shebang''' and is used to tell the operating system<br>which interpreter to use to parse the rest of the file. </i>Reference: https://linuxize.com/post/bash-shebang/ 
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.
13,420
edits

Navigation menu