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
8 changes: 1 addition & 7 deletions 01-read-input_copy_cli.sh
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,10 +1,4 @@
#!/bin/bash

echo "Hello Steven Lopez!"
echo "How old are you?"
read age
echo 'Thanks Steven! I see you are ' $age ' years old'
echo "Hello Erick Vale!"

echo "What school do you currently attend?"
read school
echo 'Nice! ' $school ' sounds like a great place to learn.'
24 changes: 24 additions & 0 deletions testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/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

echo "Hey $name, What is your filename?"
read filename
echo "You want $filename"
echo "Creating $filename ..."
touch $filename
echo "$filename created"
ls
echo "Bye,bye"
#new code added
cp 01-read_input_ADM.sh $filename
echo "contents of this file copied to $filename"