Question: Tim, a technician, creates a local variable named val and sets it to 5 0 0 0 at the bash prompt. Tim wants to use

Tim, a technician, creates a local variable named val and sets it to 5000 at the bash prompt. Tim wants to use the variable in a script. But when the script is executed, the value of val is not set to 5000.
Which of the following commands would allow Tim to set val as an environment variable that would be available to the script?
answer
export val=5000
exec val
echo $val=5000
declare val

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 Databases Questions!