Question: Do the following Create the local variable foo and assign it the value FOO Create the global variable bar and assign it the value BAR
Do the following
Create the local variable foo and assign it the value "FOO"
Create the global variable bar and assign it the value "BAR"
Write a single command that will print the values of foo and bar
Do the following
Copy print_foo_bar.sh from /home/ghoffman/course_files/it244_files to your hw8 directory
Run print_foo_bar.sh
The value of foo will not print because it is local to the login shell and cannot be seen in a subshell.Do the following
Create the global variable my_city and assign it the name of the town you live in
Write an echo statement that uses my_city to tell me where you live. The everything after echo must be quoted.
Print the value of the keyword shell variable whose value is a list of all the directories Bash will search to find an executable file with the same name as the command you typed on the command line.
Print the value of the keyword shell variable whose value is the absolute pathname of your default shell.
Run a command that will show you all your global variables.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
