Last active
June 6, 2020 11:31
-
-
Save yuraloginoff/832bac7229a1dab620e94224548708f9 to your computer and use it in GitHub Desktop.
#bash: Handling Input
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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