Write a shell script to print all odd numbers between 1 to 100.

 

Write a shell script to print all odd numbers between 1 to 100.




Program =



#!/bin/bash

echo "Utsav Gohel - 91900104011"

INDEX=0

while [ $INDEX -lt 100 ]

do

  REMAINDER=$(( $INDEX % 2 ))

  if [ $REMAINDER -ne 0 ]

  then

    echo $INDEX

  fi

  INDEX=$(($INDEX+1))

done

   

Output =