How can I create .sh extension file in Linux Ubuntu? [closed] How can I create .sh extension file in Linux Ubuntu? [closed] linux linux

How can I create .sh extension file in Linux Ubuntu? [closed]


Use this as a template:

#!/bin/bash# content of your script

The first line is called a shebang and tells the OS what program that should be used executing the content of the file, in this case, bash.

To make the file executable:

chmod 755 foo.sh

To execute your script do:

./foo.sh