How to add a shebang to a bash script

Description

A shebang or bang is a line of text at the top of a Bash script which tells the Unix operating systems which interpreter to use.

The most command one you will see when you’re doing shell scripting looks like this:

#!/bin/bash

If you’re producing Bash scripts, remember to add these to the top of your files to inform the operating system what is the correct interpreter to use.

Reference

 

Share this article

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to Top