Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions 01-read_input.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,3 +10,15 @@ 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

echo "Howdy! Ya wanna create a handy folder?"
read answer
if [ $answer == "yes" ]; then
echo "Whatcha wanna name it? I'll add a lil' twister to it for ya."
read answer
touch "Mah partner's $answer".txt
echo "I've created your $answer.txt file. See ya!"
else
echo "No problem partner. See ya around!"
fi

Empty file added Bland.txt
Empty file.
Empty file added Mah partner's About me.txt
Empty file.
Empty file.
Binary file added Michel-Git3 Branch.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Michel_post-merge.PNG
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
File renamed without changes