Bash Shell Scripting QuickStart on Linux Mint 17.3 Rosa

January 10th, 2016 by thelinuxevangelist

Linux Mint Shell Scripting QuickStart

The Linux Tutorial Shows You Step-by-Step How-to Getting-Started Making and Running a Bash Shell Script for Linux Mint 17.3 Rosa GNU/Linux.

The Key to Bash Shell Scripts is the ability to enter Multiple Commands and process the results from each command, even possibly passing the results of one
command to another. The Bash Shell allows you to Chain Commands together into a single step.

The Bash (Bourne Again Shell) is the Default Shell environment for most GNU/Linux system.

To Edit & Save our Bash Shell Script we’ll make Use of the Default GNU/Linux Shell Editor nano.

How-to QuickStart with Bash Shell Scripting on Mint Linux - Featured
  1. Open a Shell Terminal emulator window
    (Press “Enter” to Execute Commands)

    How-to QuickStart with Bash Shell Scripting on Mint Linux - Open Terminal
  2. Editing a Bash Script on Home Directory with nano
    First we Change to our Home with

    cd ~

    Then we Make the Bash Script with


    To be Runnable directly as a Shell Script we append a Bash Shebang to the Top like


    Then for Testing the Execution we should Insert a classic Hello-Word greating

    echo 'Hello World'

    The ‘echo‘ Command simply Output a String on Terminal
    So finally our simple Bash Script will be containing just

    echo 'Hello World!'
    echo 'From a Bash Shell Script :)'

    The Sequence of Bash Commands must be a Stack of sigle Commands


    Or simply in a Line of Commands Divided by a ‘;’ SemiColon

    myBashCommand1 ; myBashCommand2 ...

    Ctrl+x to Save & Exit from nano Editor

  3. Executing the Hello-World Bash Script
    We Need to give the Execution Permissions with

    chmod +x ./

    Then to Run our little Bash Script simply


    You’ll be nicely greeted on Shell with something like

    Sun Jan 10 10:31:26 PST 2016
    Hello World!
    From a Bash Shell Script :)
Share on Tumblr

Tags: , , , , , , , , , , , , , , , , , , , , , , ,

Comments are disabled