Simple Array Example in Shell Script

array output

Array stores the number of values having the same data type. Instead of creating number of variables to store values, one array can be created and multiple values can be stored in that particular array. Integers and Strings are two different data types thus ’1′ and ‘Chris’ cannot be in a same array. Newer version [...]

Create a HTML Document using shell script in Linux

shell script to create html document

You can actually create a HTML document using the shell script. If you are tired to see the output of your command in the terminal, you can redirect your output to the HTML document. This will allow you to see the output in the web browser like the website. I will assume, you know the [...]

Global variable and export command in shell script

Global Variable in shell script

Variable holds a value and have a name. We have already declared lots of variables and see how they worked. If you don’t know what I am talking about check out our shell scripting section and for the detail variable talks, see variables in shell script. Those variables are the local variables, which means variables [...]

Shell script tutorial: Shell script Function

function with argument example

The function is one of the most powerful feature of the shell script. Function is the line of codes between two parenthesis which is executed when it is called. The functions in shell script can or cannot contains the arguments. For example: we can create a function with the function name ‘addition’ which will add [...]

How to make your own calculator using shell script in Linux

Calculator Menu

Shell script is the powerhouse of Linux. We have done various things in shell scripting up to now. If you are reaching this tutorial directly and you don’t have a single clue about the shell script I recommend looking at our shell scripting section first. In this tutorial we are going to build a simple [...]

Shell Script: Case structure and Select Statement

case structure in shell script

The case structure like if statement is used in decision making in the shell script. We already find out how to make the decisions using if and else statement. Case structure provides a multiple branch decision mechanism. The case statement works both on bash shell and korn shell. You can install on Korn shell in [...]

Shell Script Looping: while, until, for

while loop in shell script

Loop or iteration is repeats certain instructions again and again until the given condition is true. The block of code under the loop is executed repeatedly until the condition is true. There are three kinds of loop: while, until and for. If you are unfamiliar with the shell scripts, first look our previous tutorial on [...]