Skip to content

Instantly share code, notes, and snippets.

@Cyclenerd
Created July 25, 2017 17:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Cyclenerd/13650883458c932e3b844993c98b7a8f to your computer and use it in GitHub Desktop.
Save Cyclenerd/13650883458c932e3b844993c98b7a8f to your computer and use it in GitHub Desktop.
Fibonacci number
#!/usr/bin/env bash
a="0"
b="1"
c=""
while [[ $b -lt 3000 ]]; do
c=$((a+b))
echo "$a + $b = $c"
a="$b"
b="$c"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment