Creating a bash script on Xubuntu

Some times doing the same action again and again is quite anoying, so creating a bash script might be the easier way out.

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:

  1. The extension of the bash script does not matter, but the usual is .sh
  2. If you are saving something that will be used globally, the best place to save is /usr/local/bin
  3. If you are saving something that will be used only by your user then save it at ~bin
  4. 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
  5. the script will be written using c++ mostly (that is Linux main language)

Have fun.

Advertisements

About mcloide

Making things simpler, just check: http://www.mcloide.com View all posts by mcloide

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: