Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all the things that shellcheck complains about #5

Merged
merged 1 commit into from Jan 1, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 3 additions & 3 deletions fizzbuzz.sh
Expand Up @@ -4,11 +4,11 @@
for i in {1..100}
do

if [ `expr $i % 3` == 0 ] && [ `expr $i % 5` == 0 ]; then
if [[ $((i % 3)) == 0 ]] && [[ $((i % 5)) == 0 ]]; then
echo "FizzBuzz"
elif [ `expr $i % 3` == 0 ]; then
elif [[ $((i % 3)) == 0 ]]; then
echo "Fizz"
elif [ `expr $i % 5` == 0 ]; then
elif [[ $((i % 5)) == 0 ]]; then
echo "Buzz"
else
echo $i
Expand Down