subject
Computers and Technology, 21.02.2020 16:24 1846252

Write and run a simple shell script named echomyvar that displays the PID (Sobell, page 467) of the process running the script and value of the variable named myvar. Display the PID of the interactive shell you are working with. What is the value of the variable within the process running the shell script? Are the interactive shell and the shell running the script run by the same or different processes (do they have the same PID)? $ cat echomyvar echo The PID of this process is $$ echo The value of myvar is: $myvar $ echo $$ 2651 $ ./echomyvar The PID of this process is 4392 The value of myvar is: The example near the top of Sobell, page 473, demonstrates a way to put a variable in the environment of a script you are calling without declaring the variable in the interactive shell you are running. Use this technique to assign a value to myvar, place it in the environment of echomyvar, and run echomyvar. After running the script, is myvar set in the interactive shell? On the command line, assign a value to the variable named myvar and then run echomyvar again. Which value does the script display? Use the export (Sobell, page 472) builtin in the interactive shell to place myvar in the environment and run echomyvar. (You can export myvar with

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 21.06.2019 15:30
Which function in spreadsheet software can be used to predict future sales or inventory needs?
Answers: 2
question
Computers and Technology, 22.06.2019 13:30
Use the keyword strategy to remember the meaning of the following word. the meaning for the word has been provided. write your keyword and describe the picture you would create in your mind. centurion: a commander in the army of ancient rome. keyword: picture:
Answers: 2
question
Computers and Technology, 22.06.2019 22:30
The qwerty keyboard is the most common layout of keys on a keyboard
Answers: 3
question
Computers and Technology, 23.06.2019 15:00
1. which of the following statements are true about routers and routing on the internet. choose two answers. a. protocols ensure that a single path between two computers is established before sending packets over it. b. routers are hierarchical and the "root" router is responsible for communicating to sub-routers the best paths for them to route internet traffic. c. a packet traveling between two computers on the internet may be rerouted many times along the way or even lost or "dropped". d. routers act independently and route packets as they see fit.
Answers: 2
You know the right answer?
Write and run a simple shell script named echomyvar that displays the PID (Sobell, page 467) of the...
Questions
question
Mathematics, 07.10.2019 14:20
question
Mathematics, 07.10.2019 14:20
question
Social Studies, 07.10.2019 14:20
Questions on the website: 13722367