To create a script you may write
in a text file, made with gedit o similar. After this first line, put comands you need and save the file with the extension .sh.
To execute it you may give it permissions to execute with the command:
chmod + example.sh
Then you can execute it. To execute it you may put the whole path, for example:
or copy it to the /bin folder.
If you want to run an script you’ve got in the same folder, you may write:
If you don’t put “./” you can’t execute the script.