How bash redirection works under the hood

Have you ever wondered how bash redirection works under the hood? Redirection itself is pretty straightforward. Using bash, you can redirect a file to a process’ stdin, or redirect a process’ stdout/stderr to a file or other file descriptor (including things like redirecting stderr to stdout, because both are file descriptors). Redirection looks like this: […]