diff --git a/after.png b/after.png new file mode 100644 index 00000000..7d731db0 Binary files /dev/null and b/after.png differ diff --git a/branch.png b/branch.png new file mode 100644 index 00000000..c0c3b538 Binary files /dev/null and b/branch.png differ diff --git a/my_03-happy.sh b/my_03-happy.sh new file mode 100644 index 00000000..79c87be6 --- /dev/null +++ b/my_03-happy.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +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/my_copy.txt b/my_copy.txt new file mode 100644 index 00000000..d334fa85 --- /dev/null +++ b/my_copy.txt @@ -0,0 +1,10 @@ +#!/bin/bash + +echo "Hello My Tran!" +echo "How old are you?" +read age +echo 'Thanks My! I see you are ' $age ' years old' + +echo "What school do you currently attend?" +read school +echo 'Nice! ' $school ' sounds like a great place to learn.'