diff --git a/01-read_Test.sh b/01-read_Test.sh new file mode 100644 index 00000000..f50359c0 --- /dev/null +++ b/01-read_Test.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! Joel" +read name +echo "Welcome, $name" + +# 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 diff --git a/03-happy.sh b/03-happy.sh index 8095d30e..3854e5a5 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -1,16 +1,22 @@ #!/bin/sh -echo "You are happy?" +<<<<<<< HEAD +echo "Is today the weekend? (yes/no)" +======= +echo "Is today the not weekend? (yes/no)" +>>>>>>> parallel read answer if [ "$answer" = "yes" ]; then - echo "Smile :)" + echo "You are correct :)" else - echo "Still Smile :)" + echo "You are not correct :(" 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 + diff --git a/gitMergeSc.JPG b/gitMergeSc.JPG new file mode 100644 index 00000000..8af93cab Binary files /dev/null and b/gitMergeSc.JPG differ diff --git a/gitSc.JPG b/gitSc.JPG new file mode 100644 index 00000000..0ab977ee Binary files /dev/null and b/gitSc.JPG differ