diff --git a/01-read_inputCOPY.sh b/01-read_inputCOPY.sh new file mode 100644 index 00000000..9aacaee9 --- /dev/null +++ b/01-read_inputCOPY.sh @@ -0,0 +1,5 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! My name is Shazmin" + diff --git a/04-life.sh b/04-life.sh index 537da386..c35ae317 100644 --- a/04-life.sh +++ b/04-life.sh @@ -14,3 +14,12 @@ fi # exercise: write a script that prints whether it is # morning or not + +echo "What time is it (hour 0-24)" +read hour + +if [ "$hour" -ge 5] && [ "$hour" -lt 12]; then + echo "Its morning!!!!" +else + echo "its not morning" +fi \ No newline at end of file