Categories
Linux Tutorial Series

Linux Tutorial Series – 52 – Standard input and output streams

Here is the video version, if you prefer it:

We are going to go a bit conceptual. We are going to talk about so-called input and output streams.

See, a computer program is pretty much indifferent to where it gets its data from (input) and where it displays the data it has calculated (output). The input can be either the keyboard, a file on your computer, some sensor, a sample of your voice, some other thing I haven’t thought of – it doesn’t matter; the computer program gets some input in whatever way, does something with it, and then outputs it. Outputs it where? On the computer screen, by default. But it can also write to a file, send the output over the computer network, or something else – there’s a lot of options.

So remember – input and output streams, plainly said, are an abstract term used to answer the questions “Where does my computer program get data from?” and “Where does my computer program output the thing it computed?” This is going to be important when learning about some Linux things.

There is also the standard error stream – if something goes wrong, it is passed to the standard error stream. (Ward, 2014)⁠

Hope you learned something useful!

References

Ward, B. (2014). How Linux Works: What Every Superuser Should Know (2nd ed.). No Starch Press. Pages 13-14

NewsletterUpdates on interesting things I am doing

Subscribe to my newsletter to keep abreast of the interesting things I'm doing. I will send you the newsletter only when there is something interesting. This means 0% spam, 100% interesting content.

Leave a Reply

Your email address will not be published.