diff --git a/01-read_input - Copy.sh b/01-read_input - Copy.sh new file mode 100644 index 00000000..4c59f971 --- /dev/null +++ b/01-read_input - Copy.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# read the name of the user and print hello + +echo "Hello! What is your name" +read JeanMakita +echo "Welcome, $JeanMakita" + +# single quotes prevent the expansion of the variable +echo 'Your name was stored in $JeanMakita' + +# exercise: write a script that asks the user for a +# filename and create an empty file named after it diff --git a/JeanMakita/bash_basics b/JeanMakita/bash_basics new file mode 160000 index 00000000..d40c2a3e --- /dev/null +++ b/JeanMakita/bash_basics @@ -0,0 +1 @@ +Subproject commit d40c2a3ed5ef683148dedbfdcb19ffbe31763264 diff --git a/[bash_basics] b/[bash_basics] new file mode 100644 index 00000000..e69de29b diff --git a/clone.txt b/clone.txt new file mode 100644 index 00000000..438445b4 --- /dev/null +++ b/clone.txt @@ -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 diff --git a/my_script.sh b/my_script.sh new file mode 100644 index 00000000..a2b11a95 --- /dev/null +++ b/my_script.sh @@ -0,0 +1,9 @@ +echo "JeanMakita" + +echo "Hello! Have a great day ahead!" + +for (( i=1; i<=5; i++ )) + +do + echo "This is iteration $i" +done