What output would you expect after typing the following:
$ prog1
$ e2=20; export e2
$ e4=40 prog1
Here are two programs called prog1 and prog2:
$ cat prog1
e1=100
export e1
e2=200
e3=300 prog2
$ cat prog2
echo e1=$e1 e2=$e2 e3=$e3 e4=$e4
$
The output demonstrates how variables live within their own shell unless forced otherwise with the export command, so the result of the invocation is:
$ prog1
e1=100 e2= e3=300 e4=
$ e4=40 prog1
e1=100 e2=200 e3=300 e4=40
$ prog1
e1=100 e2=200 e3=300 e4=
$
You might also like to view...
Which number in the accompanying figure represents the button used to begin recording?
A. 1 B. 2 C. 3 D. 4
Which method sets the text that's displayed when the user hovers over a JLabel?
a. setHover b. setHoverText c. setToolTip d. setToolTipText
What is true about the address 2001:db8:234:567::0/64?
A. it is an anycast address B. it is a broadcast address C. it is a valid IID D. it is an invalid network prefix
Which of the following is a federally funded Internet security research and development center?
A. W3C B. NSF C. CERT/CC D. Internet2