diff --git a/01-read_input_Erika.sh b/01-read_input_Erika.sh new file mode 100755 index 00000000..34249596 --- /dev/null +++ b/01-read_input_Erika.sh @@ -0,0 +1,21 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! What is your name" +read name +echo "Welcome, Erika" + +# single quotes prevent the expansion of the variable +echo 'Your name was stored in $name' + +# exercise: write a script that asks the user for a +# filename and create an empty file named after it + +echo "Hey $name, What is your filename?" +read filename +echo "You want $filename" +echo "Creating $filename ..." +touch $filename +echo "$filename creted" +ls +echo "Bye,bye" diff --git a/03-happy.sh b/03-happy.sh index caa24718..2c4d2250 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -16,8 +16,7 @@ fi # the weekend or not echo "Which day of a week is today?" read day -if [[ ${day,,} == "saturday" ]] | [[ ${day,,} == "sunday" ]] -then +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." diff --git a/AfterMerging.png b/AfterMerging.png new file mode 100644 index 00000000..0798973e Binary files /dev/null and b/AfterMerging.png differ diff --git a/graph.png b/graph.png new file mode 100644 index 00000000..15e2e82d Binary files /dev/null and b/graph.png differ