diff --git a/01-read_input.sh b/01-read_input.sh index 438445b..60ea6c7 100644 --- a/01-read_input.sh +++ b/01-read_input.sh @@ -1,12 +1,15 @@ #!/bin/bash # read the name of the user and print hello -echo "Hello! What is your name" -read name -echo "Welcome, $name" +echo "Hello! What is your first name!" +read firstname +echo "what is your last name!" +read lastname +echo "Welcome, $firstname $lastname" # single quotes prevent the expansion of the variable -echo 'Your name was stored in $name' +echo 'Your name was stored in $firstname $lastname' # exercise: write a script that asks the user for a # filename and create an empty file named after it + diff --git a/1.jpg b/1.jpg new file mode 100644 index 0000000..c15cd28 Binary files /dev/null and b/1.jpg differ diff --git a/myscript.sh b/myscript.sh new file mode 100644 index 0000000..438445b --- /dev/null +++ b/myscript.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, $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