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, 22.06.2019 12:40
The most complicated four letter word
Answers: 1
question
Computers and Technology, 22.06.2019 18:30
What is outfitting a workplace with video in a technology
Answers: 2
question
Computers and Technology, 22.06.2019 21:30
Nathan wants to create multiple worksheet containing common formatting styles for his team members. which file extension him to save these worksheets? nathan to create multiple worksheets with common styles. he needs to save them with the extension.
Answers: 1
question
Computers and Technology, 23.06.2019 11:30
Which excel file extension stores automated steps for repetitive tasks?
Answers: 1
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
Geography, 26.12.2021 14:00
question
Social Studies, 26.12.2021 14:00
question
Computers and Technology, 26.12.2021 14:00
question
Advanced Placement (AP), 26.12.2021 14:00
question
Mathematics, 26.12.2021 14:00
question
Mathematics, 26.12.2021 14:00
question
English, 26.12.2021 14:00
question
Mathematics, 26.12.2021 14:00