Calculate the Fibonacci sequence using bash I would like your opinion on my shell script that prints the Fibonacci sequence.

#!/bin/bash

first=0
second=1
third=1
echo -n "Term: "
read term

fub=$((second+third))
echo $second
echo $third
echo $fub

for ((i=1; i&lt;term; i++))
do
  third=$((fub+third))
  echo $third
  fub=$((third+fub))
  echo $fub
done


I tried to calculate the Fibonacci sequence in the simplest way (without the use of recursive functions).
What does "Term" mean? I'd prefer to see 5 numbers if the user entered 5.

#!/bin/bash

echo -n 'Term: '
read term

i=0
j=1
for (( c=0; c&lt;term; c++ )) ; do
    (( n=i+j ))
    (( i=j ))
    (( j=n ))
    echo $i
done