Skip to content

Instantly share code, notes, and snippets.

@yuraloginoff
Last active June 6, 2020 11:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save yuraloginoff/832bac7229a1dab620e94224548708f9 to your computer and use it in GitHub Desktop.
Save yuraloginoff/832bac7229a1dab620e94224548708f9 to your computer and use it in GitHub Desktop.
#bash: Handling Input
#!/bin/bash
read -p "Enter your name : " name
echo "Hi, $name. Let us be friends!"
# read three numbers and assigned them to 3 vars
read -p "Enter number one : " n1
read -p "Enter number two : " n2
read -p "Enter number three : " n3
# display back 3 numbers - punched by user.
echo "Number1 - $n1"
echo "Number2 - $n2"
echo "Number3 - $n3"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment