HF RL Explorer

Task: Piping Command Output to Tee While Preserving Exit Code

Task: Piping Command Output to Tee While Preserving Exit Code: a task in Terminal-Lego-15k (Harbor dataset). Create a shell script that executes a command, pipes its output to tee (saving to a log file), and correctly preserves and returns the exit code of the original command — not the exit code…

The task

Create a shell script that executes a command, pipes its output to `tee` (saving to a log file), and correctly preserves and returns the exit code of the original command — not the exit code of `tee`.

Part of PrimeIntellect/Terminal-Lego-15k.