Shell Script to print Fibonacci series

Program

#! /bin/bash
echo "Enter the value of n"
read n
a=0
b=1
count=2
echo "Fibonacci series:"
echo $a
echo $b
while [ $count -le $n ]
do
fib=`expr $a + $b`
a=$b
b=$fib
echo $fib
count=`expr $count + 1`
done

Output

$ chmod 755 fibonacci_series.sh
$ sh fibonacci_series.sh
Enter the value of n
6
Fibonacci series:
0
1
1
2
3
5
8