Discussion
In a UNIX shell, the command VAR=10; export VAR does which of the following ?
Answer: C
The command makes the variable available to child processes.
VAR=10 creates a shell variable that exists only in the current shell. export VAR then marks it for the environment, so every program or subshell started from this shell afterwards receives a copy of VAR with the value 10. A script run from the shell can read it, for example with echo $VAR.
Option A describes VAR=10 on its own, before the export. A read-only variable is made with the readonly command, and a variable is deleted with unset; export does neither.
No comment is present. Be the first to comment.
Loading…
Post your comment
Please log in or register to post a comment.
Examination Categories
- SSC Exams
- Banking Exams
- Teaching Exams
- Civil Services Exams
- Railways Exams
- Engineering Recruitment Exams
- Defence Exams
- State Government Exams
- Police Exams
- Insurance Exams
- Nursing Exams
- Other Government Exams
- NRA CET
- PG Entrance Exams
- Campus Placement
- MBA Entrance Exams
- CUET and UG Entrance
- Judiciary Exams
- Regulatory Body Exams
- Software Development