Automation, Orchestration, and Scripting

A script starts in /home/admin and runs the following line with MODE previously unset: (cd /tmp && export MODE=fast) The script then runs pwd and echo "$MODE". What do these two commands show?

Show the answer

Correct answerB. /home/admin and an empty MODE

Parentheses run the commands in a subshell, so the directory change and the exported variable disappear when it exits. The parent shell stays in /home/admin with MODE unset. Only braces { ; } would run the commands in the current shell.