4 ms·
Claude’s answer, which is the only one that clicked for me: Normally when you do something like command > file.txt, you’re only capturing the normal output — e
by james_marks 7mo ago
Claude’s answer, which is the only one that clicked for me:
Normally when you do something like command > file.txt, you’re only capturing the normal output — errors still go to your screen.
2>&1 is how you say: “send the error pipe into the same place as the normal output pipe.”
Breaking it down without jargon:
• 2 means “the error output”
• > means “send it to”
• &1 means “wherever the normal output is currently going” (the & just means “I’m referring to a pipe, not a file named 1”)
- r4bbb1t 7mo ago[dead]
- NekkoDroid 7mo ago> • 2 means “the error output” • > means “send it to” • &1 means “wherever the normal output is currently going” (the & just means “I’m referring to a pipe, not a file named 1”) If you want it with the correct terminology: 2 means "file descriptor 2", > means "assign the previous mentioned to the following", &2 means "file descriptor 1" (and not file named "1")
- DonaldPShimoda 7mo ago> Claude’s answer This response is essentially just the second answer to the linked question (the response by dbr) with a bunch of the important words taken out. And all it cost you to get it was more water and electricity than simply clicking the link and scrolling down — to say nothing of the other costs.
- james_marks 7mo agoFWIW, I clicked the link, scanned the SO thread, then scanned the HN thread. The "bunch of important words taken out" is exactly the service I paid AI for. "I didn't have time to write you a short letter, so I wrote you a long one." is real.