diff --git a/07-beer.sh b/07-beer.sh index c03aded..1b403ea 100644 --- a/07-beer.sh +++ b/07-beer.sh @@ -19,6 +19,30 @@ while [ $count -ge 0 ]; do ((count = count - 1)) done +echo "" +echo "Now let's sing 5 little ducks" + +ducks=5 + +while [ $ducks -ge 0 ]; do + if [ $ducks -gt 1 ]; then + echo "$ducks little ducks went out one day" + echo "Over the hills and far away" + echo "Mother duck said quack quack quack quack" + elif [ $ducks -eq 1 ]; then + echo "$ducks little duck went out one day" + echo "Over the hills and far away" + echo "Mother duck said quack quack quack quack" + else + echo "No little ducks went out one day" + echo "Over the hills and far away" + echo "Mother duck said quack quack quack quack" + echo "And all of the 5 little ducks came back" + fi + + echo "" + ducks=$((ducks - 1)) +done # exercise: implement another counting song (such as 12 days of Christmas) # using loops and if statements. diff --git a/aftermerge.png b/aftermerge.png new file mode 100644 index 0000000..9c159b6 Binary files /dev/null and b/aftermerge.png differ diff --git a/twobranch.png b/twobranch.png new file mode 100644 index 0000000..1865233 Binary files /dev/null and b/twobranch.png differ