diff --git a/bash_basics/01-read_input.sh b/bash_basics/01-read_input.sh new file mode 100644 index 00000000..59105c6e --- /dev/null +++ b/bash_basics/01-read_input.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 "Your full name is $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