#!/bin/bash # Prints out the fibonacci sequence up to the value indicated in the first argument. first=1 second=1 echo $first echo $second while [ $second -lt $1 ] do next=$((first+second)) first=$second second=$next done