3 ms·
> 2>&1. You probably shouldn't be touching the shell if you don't know what that does... I use the shell almost daily, and have shipped industry-leading produc
by gwbas1c 3y ago
> 2>&1. You probably shouldn't be touching the shell if you don't know what that does...
I use the shell almost daily, and have shipped industry-leading products.
2>&1 is a vague memory because I'm not sure if I've ever done that; and I certainly shouldn't have to know some arcane shell trick to read the manual.
- Hizonner 3y agoIt turns out that the right answer doesn't even depend on your level of shell knowledge or on how you tend to use the shell. I use much more complicated pipe tricks than that interactively on a daily basis, and I definitely don't think of them as "arcane". As somebody who does that, it's useful to me to know which channel the data I want to pipe are going to come out on. Which is why help, which is normal requested output, should obviously go to stdout. Usage messages issued in response to actual user errors are different, of course.
- dingosity 3y agoSure. But the comment wasn't "You probably shouldn't be touching the shell if you haven't shipped industry-leading products" it was "You probably shouldn't be touching the shell if you don't know what that does." Also, if you needed to use it every day, I suspect it would be more familiar than a vague memory.
- gwbas1c 3y agoI use the shell almost daily. I don't pipe command output daily, though. I use the shell because often it's easier than point-and-click for a lot of operations. The shell has plenty of use cases that don't involve piping output. Saying you shouldn't touch the shell unless you understand piping output is like saying you shouldn't touch a refrigerator unless you know the perfect temperature to store milk.