diff --git a/03-devin.sh b/03-devin.sh new file mode 100755 index 00000000..19261701 --- /dev/null +++ b/03-devin.sh @@ -0,0 +1,25 @@ +#!/bin/sh +echo "Welcome, this script was edit by Devin" + +echo "You are happy?" +read answer + +if [ "$answer" = "yes" ]; then + echo "Smile :)" +else + echo "Still Smile :)" +fi + +# here are the other string comparison operators +# != , -n (not an empty string) , -z (an empty string) + +# exercise: write a script that prints whether today is +# the weekend or not +echo "Which day of a week is today?" +read day +if [[ ${day,,} == "saturday" ]] | [[ ${day,,} == "sunday" ]] +then + echo "Horayyyy!! Today is the weekend. Enjoy yourself! Be ready for the next week." +else + echo "Today is a weekday. Keep focus on your work." +fi \ No newline at end of file diff --git a/03-happy.sh b/03-happy.sh old mode 100644 new mode 100755 index caa24718..8f7d0cd5 --- a/03-happy.sh +++ b/03-happy.sh @@ -1,24 +1,19 @@ -#!/bin/sh +#!/bin/bash -echo "You are happy?" +echo "Are you happy today?" read answer if [ "$answer" = "yes" ]; then - echo "Smile :)" + echo "Awesome, keep smiling :)" else - echo "Still Smile :)" + echo "Smile anyway :)" fi -# here are the other string comparison operators -# != , -n (not an empty string) , -z (an empty string) - -# exercise: write a script that prints whether today is -# the weekend or not -echo "Which day of a week is today?" +echo "Which day of the week is today?" read day -if [[ ${day,,} == "saturday" ]] | [[ ${day,,} == "sunday" ]] -then - echo "Horayyyy!! Today is the weekend. Enjoy yourself! Be ready for the next week." -else - echo "Today is a weekday. Keep focus on your work." + +if [[ ${day,,} == "saturday" || ${day,,} == "sunday" ]]; then + echo "Nice! It's the weekend." +else + echo "It's a weekday. Stay focused." fi \ No newline at end of file diff --git a/after-merging.png b/after-merging.png new file mode 100644 index 00000000..14bbfcbf Binary files /dev/null and b/after-merging.png differ diff --git a/two-branches.png b/two-branches.png new file mode 100644 index 00000000..8a4808c6 Binary files /dev/null and b/two-branches.png differ