| ▲ | jez 4 hours ago | ||||||||||||||||||||||||||||
Another fun consequence of this is that you can initialize otherwise-unset file descriptors this way:
It's a trick you can use if you've got a super chatty script or set of scripts, you want to silence or slurp up all of their output, but you still want to allow some mechanism for printing directly to the terminal.The danger is that if you don't open it before running the script, you'll get an error: | |||||||||||||||||||||||||||||
| ▲ | 47282847 4 hours ago | parent [-] | ||||||||||||||||||||||||||||
Interesting. Is this just literally “fun”, or do you see real world use cases? | |||||||||||||||||||||||||||||
| |||||||||||||||||||||||||||||