diff --git a/03-happy.sh b/03-happy.sh index 485527d..380a6de 100644 --- a/03-happy.sh +++ b/03-happy.sh @@ -3,12 +3,15 @@ echo "You are happy?" read answer +echo $RANDOM + if [ "$answer" = "yes" ]; then echo "hmmmm gooood yess you are happy" else echo "Still Smile c:" fi +echo $RANDOM # here are the other string comparison operators # != , -n (not an empty string) , -z (an empty string) diff --git a/Screenshot.png b/Screenshot.png new file mode 100644 index 0000000..25041b1 Binary files /dev/null and b/Screenshot.png differ diff --git a/new_name.sh b/new_name.sh new file mode 100644 index 0000000..674c8f7 --- /dev/null +++ b/new_name.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! What is your name" +read name +echo "Welcome, Daniel" + +# 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