Question 4999 – Operating-Systems
November 17, 2023Question 5068 – Operating-Systems
November 17, 2023Question 5070 – Operating-Systems
Which of the following set of Unix commands will always display “WELCOME” ?
Correct Answer: C
Question 622 Explanation:
title = WELCOME;
export title ; /* The export command marks an environment variable to be exported with any newly forked child processes and thus it allows a child process to inherit all marked variables.*/
sh –c “echo $title”; /* sh calls the program sh as interpreter and the -c flag means execute the following command as interpreted by this program. */
echo→ will display the content of a variable.
export title ; /* The export command marks an environment variable to be exported with any newly forked child processes and thus it allows a child process to inherit all marked variables.*/
sh –c “echo $title”; /* sh calls the program sh as interpreter and the -c flag means execute the following command as interpreted by this program. */
echo→ will display the content of a variable.
export title=WELCOME; Echo $title
title = WELCOME; export $ title ; sh –c “echo $title”
title = WELCOME; export title ; sh –c “echo $title”
title = WELCOME; echo $title
Subscribe
Login
0 Comments