-
What is special about a GLOBAL variable?
you can use it in any subshell of the shell in which it was created.
-
What are the limitations of a LOCAL variable?
you can only use it in the shell in which it was created
-
What would you write on the command line to set the value of the LOCAL
variable named team to Red Sox.
team="Red Sox"
-
If you define a local variable, can a script see the value
of this variable?
no
-
What would you write on the command line to create the GLOBAL
variable named school and set its
value to UMass Boston.
export school="UMass Boston"
-
Write the command you would use in a script to ask the user to provide
a value for a variable named dir
read -p "Directory: " dir
-
What command would you use to see all GLOBAL variables?
env
-
What character would you use if you wanted to run two commands
IN THE FOREGROUND, one right after the
other, on a SINGLE command line?
;
-
What other two characters allow more than one command to be run on a SINGLE
command line?
& and | (the pipe character)
-
How can you continue a command onto the next line?
type \ immediately before hitting Enter