cli.fail

Practice this fail.

One command. One environment.

Linux · Restart as often as you like

Read the error, choose a command, and learn
why it works. Nothing runs on your machine.

Browse all practice ↗

Linux · Intermediate

In Bash, run a trusted ./check.sh with MODE=test only for that invocation. Do not change MODE in the surrounding shell.

One command. One environment.

$ echo "$MODE"

production

How do you set MODE only for the script invocation?

3 attempts remaining

Read why this fix works

One command. One environment.

MODE=test ./check.sh

A variable assignment preceding a simple external command supplies that variable to that command’s environment. It does not persist as an assignment in the surrounding shell.

Practice rounds do not affect the daily score or local streak. Try today’s challenge, or choose another scenario.

Copy your result