why #!/bin/bash is required

It is called the Shebang rotation

#which bash
/bin/bash

#sh script_name.sh ---> here we no need to mention !/bin/bash line in script

but we want to give as below then we reuired the line so that it can understand it will be bash
#./script_name

more details check the below URL
http://en.wikipedia.org/wiki/Shebang_%28Unix%29

Comments

Popular posts from this blog

How to delete SEA in VIOS

Webmin configuration for LDAP

Sample questions and answers for AWS Associate Solutions Architect Certification ---> AWS exam dumps