diff --git a/10-greeter.sh b/10-greeter.sh index 824d239..010bddf 100644 --- a/10-greeter.sh +++ b/10-greeter.sh @@ -1,29 +1,29 @@ #/bin/sh -# function in bash - function weekend_greet { - echo "Enjoy the weekend! ${1}!" + echo "Enjoy the weekend, $1! You are feeling $2 today!" } function weekday_greet { - echo "Hope you are working hard, ${1}!" + echo "Hello $1, keep pushing! You're feeling $2 today!" } - echo "Please enter your name" read name -day=$(date | cut -d' ' -f1) # you can use this form instead of backticks +echo "How are you feeling today?" +read mood + +day=$(date | cut -d' ' -f1) if [ $day = "Sat" ] || [ $day = "Sun" ]; then - weekend_greet $name + weekend_greet $name $mood else - weekday_greet $name + weekday_greet $name $mood fi # exercise: Add a second argument to the function # and make it give a greeting based on the new -# argument. +# argument. \ No newline at end of file diff --git a/after-merge.png b/after-merge.png new file mode 100644 index 0000000..2fd9df8 Binary files /dev/null and b/after-merge.png differ diff --git a/asliee.sh b/asliee.sh new file mode 100644 index 0000000..d96ea67 --- /dev/null +++ b/asliee.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Welcome, my name is Asliee" + diff --git a/two-branches.png b/two-branches.png new file mode 100644 index 0000000..a916e24 Binary files /dev/null and b/two-branches.png differ