Question: After setting a variable named VAR 1 , a script complains that the variable doesn't exist. How can you ensure that this variable is available

After setting a variable named VAR1, a script complains that the variable doesn't exist. How can you ensure that this variable is available for subshells?
Add the variable to a config file in the /etc directory.
Run the command "export $VAR1".
Use the "env $VAR1" command.
Add the $VAR1 variable as a flag for the script.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!