Multiple choice technology operating systems

Find the output of the last echo command: $ pwd /home/guest $ cat test.sh export i=100 $ sh test.sh $ echo $i

  1. 100

  2. blanck line

  3. No such variable $i
  4. None of these

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

When a script runs with 'sh test.sh', it executes in a separate shell process. Exported variables only affect child processes of that script, not the parent shell. After the script exits, the variable i no longer exists in the current shell, resulting in an empty line when echoed.