Skip to content

Instantly share code, notes, and snippets.

@ksred
Last active May 31, 2018 23:42
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ksred/8576824 to your computer and use it in GitHub Desktop.
Save ksred/8576824 to your computer and use it in GitHub Desktop.
Bash example showing basic input and output
#! /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