From d7885ff523d6d51a7f82eec8518115c01b1ec618 Mon Sep 17 00:00:00 2001 From: aeristran Date: Fri, 24 Oct 2025 20:25:56 -0400 Subject: [PATCH] Added 7 days Christmas song add new counting song --- 07-beer.sh | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) mode change 100644 => 100755 07-beer.sh diff --git a/07-beer.sh b/07-beer.sh old mode 100644 new mode 100755 index c03aded..e3f4983 --- a/07-beer.sh +++ b/07-beer.sh @@ -22,3 +22,26 @@ done # exercise: implement another counting song (such as 12 days of Christmas) # using loops and if statements. + +echo "" +echo "Let's sing a 7 days Christmas song" + +for day in 1 2 3 4 5 6 7; do +echo "on the $day day of Christmas, my true love gave to me:" + +if [ $day -eq 1 ]; then +echo "a partridge in a pear tree" + +elif [ $day -eq 2 ]; then +echo "Two turtle doves" +echo "And a partridge in a pear tree" + +elif [ $day -eq 3 ]; then +echo "Three French hens" +echo "Two turtle doves" +echo "And a partridge in a pear tree" + +else +echo "$day wonderful gifts!" +fi +done \ No newline at end of file