Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "What happens in `command >out.log 2>&1`?" on CodeWiki (https://codewiki.com/practice/mcq/foundations/checkpoint-3/checkpoint-3-redirection-order/).
Context (verbatim from the page):
"""
What happens in `command >out.log 2>&1`?
Standard output goes to `out.log`, then standard error is duplicated to that same destination.
Standard error goes to the original terminal because redirection order never matters.
The shell writes descriptor 2 into a file named `&1`.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in CS foundations. Where you are unsure, say so.