what command do you run in a script to get input from a user?
read
create a sample script using the read command.
!/bin/bash
echo “hello, it is nice to meet you. What is your name? “
read name
echo” Hello $name I’m glad you’re here”
create another script, define variables and use the read statement.
a= apple
echo “my favorite fruit is $a what is your favorite food? “
read -p “my favorite food is “ food
echo “oh wow i love $food as well”
run a script with if else statements
lab
run a script with for loops