Chapter 1 script components
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 | |
# 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