A bash script is simply a file that executes a series of commands. Something very similar to bat files on Windows.
As many other Xubuntu and Linux users, I had no idea of how to create a bash script and how to execute. Well is pretty simple. While surfing the net I found a pretty good tutorial that will give you the basics of how to create a very simple bash script: http://floppix.ccai.com/scripts1.html
Now some notes:
- The extension of the bash script does not matter, but the usual is .sh
- If you are saving something that will be used globally, the best place to save is /usr/local/bin
- If you are saving something that will be used only by your user then save it at ~bin
- Linux will look for any command that is inside the bin dir, but you can access it on it’s current directory by typing ./command
- the script will be written using c++ mostly (that is Linux main language)