Shell Script Examples


  • Getting Started

  • Hello World

  • Read number from user

  • Read and display name

  • Add two numbers using command line arguments

  • Addition of two numbers

  • Multiplication of two numbers

  • Division of two numbers

  • Positive or negative

  • Greatest of two numbers

  • Greatest of three numbers

  • Print 1 to 100

  • Sum of all digit

  • Largest of N numbers

  • Average of N numbers

  • Factorial of a number

  • Sum of N numbers

  • Add array elements

  • Add two numbers - function

  • Compare two strings