Created
August 8, 2023 19:20
-
-
Save GitarPlayer/f6ea6410a204ecef98a5e6c7feddfcde to your computer and use it in GitHub Desktop.
Chapter 1 script components
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 | |
# 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