This is a basic shell script to find whether given number is even or odd. Here we use a simple condition rem=$(( $n % 2 )) to check the number is even or not. If the remainder is 0 then the number is Even else it is odd.

# Shell

This shell script is used to find greatest of three given numbers. The conditions are very simple. Just go through the program.

## Shell Script to Check Leap Year

April 19, 2013This shell script is used to find given year is Leap year or not by checking the condition: y=$(( $y % 4 ))

## Shell Script to Check Number is Positive or not

April 18, 2013How do you find a number is positive or negative. By checking if it is greater than zero or not. Here we use the same condition for checking the Number if it is positive, negative or equal to zero.

## Shell Script to Find Simple Interest

April 17, 2013Do you remember doing Simple Interest problems in your 5th grade? We use the same old formula for calculating the Simple Interest by collecting the Principle Amount, Time and Rate of Interest.

## Shell Script to find Side of a Square

April 16, 2013Shell Script to find side of a square is just squaring the given number. The actual formula of side of a square is side*side

## Shell Script to Find Sum of Digits

April 15, 2013This shell script is used to find the sum of Digits. If the given number is 23 then the sum will be 2+3 = 5. The script is explained below: Example: Given Number is: 23. Then n=23. First Iteration: sd=3 n=2 sum=2 —– Second Iteration: sd=2 n=0 sum=5 Output:

## Shell Script to Perform String Comparison

April 14, 2013This script is used to check whether two given strings are equal or not. We can do this by simple comparison if [ $string1 -eq $string2 ].

## Shell Script to Reverse a Number

February 27, 2013This article will discuss about Shell Program to Reverse a Number. Reversing a Number program follows the same logic of a Palindrome program, but here we will not check the condition whether the given number is Palindrome or not. Shell Program to Reverse a Number Output:

## Shell Script to Print Multiplication Table

February 26, 2013The following program is used to print the Multiplication table of a given number. We have written two program below. One is used to print Multiplication Range upto 10 and another is used to Print Multiplication Table upto a given range. We have already written a C Program to print Multiplication Table earlier. Here we […]