It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
> bash's syntax is so weird What should be the syntax according to contemporary IT people? JSON? YAML? Or just LLM prompt?
What does " 2>&1 " mean?
71–80 of 260 posts
Re: What does " 2>&1 " mean?
#72It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
Re: What does " 2>&1 " mean?
#73It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
It should be a lesson to learn on how simple, logical and reliable tools can last decades.
Re: What does " 2>&1 " mean?
#74Earlier quoted context omitted.
> bash's syntax is so weird What should be the syntax according to contemporary IT people? JSON? YAML? Or just LLM prompt?
Trying to be language agnostic: it should be as self-explanatory as possible. 2>&1 is all but. Why is there a 2 on the left, when the numbers are usually on the right. What's the relationship between 2 and 1? Is the 2 for std err? Is that `&` to mean "reference"? The fact you only grok it if you know POSIX sys calls means it's far from self explanatory. And given the proportion of people that know POSIX sys calls amo…
If your complaint is "I don't know what this syntax means without reading the manual" I'd like to point you to any contemporary language that has things like arrow functions, or operator overloading, or magic methods, or monkey patching.
Re: What does " 2>&1 " mean?
#75Redirects are fun but there are way more than I actually routinely use. One thing I do is the file redirects. diff I do that with diff <(xxd -r file.bin) <(xxd -r otherfile.bin) sometimes when I should expect things to line up and want to see where things break.
Also the reason why Zsh has an additional =(command) construct which uses temporary files instead.
Re: What does " 2>&1 " mean?
#76Earlier quoted context omitted.
Interesting. Is this just literally “fun”, or do you see real world use cases?
Multiple levels of logging, all of which you want to capture but not all in the same place.
Re: What does " 2>&1 " mean?
#77It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
Re: What does " 2>&1 " mean?
#78Re: What does " 2>&1 " mean?
#79It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
It should be a lesson to learn on how simple, logical and reliable tools can last decades.
Re: What does " 2>&1 " mean?
#80It's a reminder of how archaic the systems we use are. File descriptors are like handing pointers to the users of your software. At least allow us to use names instead of numbers. And sh/bash's syntax is so weird because the programmer at the time thought it was convenient to do it like that. Nobody ever asked a user.
Who do you imagine the users were back when it was being developed?
Even if you're a programmer, that doesn't mean you magically know what other programmers find easy or logical.