For a lot of people, STDIN (standard input), STDOUT (standard output), and STDERR (standard error) are one of the most confusing subjects. Hopefully, in this post, I can explain once and for all the concepts.
In UNIX you might have heard people mention that everything is a file. Well that is close to correct. I would say that in UNIX everything is defines around file descriptors or FD.
A file descriptor or FD, is a unique identifier referred to as a handle, which identifies a file, an input/output resource, network resource, etc. It is normally a positive number that starts from 0 zero. In UNIX, every process gets, at the very least, 3 file descriptors: Continue reading “Standard Input (STDIN), Output (STDOUT), and Error (STDERR) Explained (part 1)”