Skip to content

Instantly share code, notes, and snippets.

@GitarPlayer
Created August 8, 2023 19:20
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 GitarPlayer/f6ea6410a204ecef98a5e6c7feddfcde to your computer and use it in GitHub Desktop.
Save GitarPlayer/f6ea6410a204ecef98a5e6c7feddfcde to your computer and use it in GitHub Desktop.
Chapter 1 script components
#!/bin/bash
# define var in script
GREETING="Welcome"
echo GREETING
echo $GREETING
# pass var as arg
echo "you have typed $1 as the first argument"
echo "these are all arguments: $@"
# read var from user input
echo "what is your name?"
read NAME
echo "$GREETING, $NAME"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment