Use the export (Sobell, page 485) builtin in the interactive shell to place myvar in the environment and run echomyvar. (You can export myvar with- out assigning a new value to it.) Did the script display the value of myvar this time? Is the PID of the interactive shell the same or different from the PID of the script?
What will be an ideal response?
$ export myvar
$ ./echomyvar
The PID of this process is 4452
The value of myvar is: zach
$ echo $$
2651
Yes, the script displayed the value of myvar; the PIDs are different.
You might also like to view...
Explain the assumption behind the core framework of roles and competencies of EBK.
What will be an ideal response?
In a modularized program the __________ module usually serves as the starting point.
Fill in the blank(s) with the appropriate word(s).
A process contains one or more threads, and Windows XP can concurrently execute those threads using a technique called __________.
a. multitasking b. multithreading c. context switching d. multiprogramming
Programming style is important, because ______________.
a. a program may not compile if it has a bad style b. good programming style can make a program run faster c. good programming style makes a program more readable d. good programming style helps reduce programming errors