Knowing Supported Shells and their location


Creating a "Hello world" shell script

<aside> 💡 Giving the .sh extension to a shell is optional. The file can be executed as a shell script without the .sh extension. Using an extension will help editors to provide linting capabilites.

</aside>

<aside> ⚠️ Sometimes when you try to execute a shell script you might face an error saying Permission denied. When this happens, use the chmod command to give the execute permission to the user or to one who wants to execute the script.

</aside>

$ touch hello-world.sh
$ code hello-world.sh
#! /bin/bash
echo "Hello world"

$ ./hello-world.sh
Hello world