xxxxxxxxxx
echo "What's your name?"
read name
echo "Hello, $name! Nice to meet you."
xxxxxxxxxx
# fullname="USER INPUT"
read -p "Enter fullname: " fullname
# user="USER INPUT"
read -p "Enter user: " user
xxxxxxxxxx
#!/bin/bash
# Ask the user for their name
echo Hello, who am I talking to?
read varname
echo It\'s nice to meet you $varname
xxxxxxxxxx
# The file content inside "greet.sh"
# This script accepts the user's name and prints a message greeting the user
# Print the prompt message on screen
echo -n "Enter your name :"
# Wait for user for input, and save the entered value into the variable 'name'
read name
# Print the welcome message followed by the name
echo "Welcome $name"
# Execute the shell script
bash greet.sh