#!/bin/bash
# Script name: myscript.sh
# Description: This script does XYZ
# Author: John Doe
# Date: March 17, 2023
# Script body starts here...
In this example, the shebang #!/bin/bash
is used to specify that the script should be executed using the bash shell.
The comments after the shebang provide information about the script, such as its name, what it does, who wrote it, and when it was last modified. This information can be useful for documentation and version control purposes.
After the header, the script body follows. This is where the actual commands and logic of the script are written.