Created
January 5, 2017 15:00
-
-
Save stevenwilkin/20c9a7f3c5e4a554aaebf7690df2d177 to your computer and use it in GitHub Desktop.
Revisions
-
stevenwilkin created this gist
Jan 5, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,12 @@ #!/bin/bash set -u for i in $(seq 1 20); do divisible_by_three=$(expr $i % 3) divisible_by_five=$(expr $i % 5) [ $divisible_by_three -eq 0 ] && [ $divisible_by_five -eq 0 ] && echo "Fizz Buzz" && continue [ $divisible_by_three -eq 0 ] && echo "Fizz" && continue [ $divisible_by_five -eq 0 ] && echo "Buzz" && continue echo $i done