Last active
May 31, 2018 23:42
-
-
Save ksred/8576824 to your computer and use it in GitHub Desktop.
Bash example showing basic input and output
This file contains hidden or 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 | |
#A comment stating what this program is about | |
#Taking input, showing output | |
echo “Please enter in a variable” | |
read VARIABLE | |
echo “The variable you entered is: $VARIABLE” | |
#Taking in arguments | |
#Usage: ./script.sh var1 var2 var3 | |
echo “Variables – one: $1 | two: $2 | three: $3” |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment