Steven D'Aprano <steve+comp.lang.pyt...@pearwood.info> writes:
> On Tue, 03 Jun 2014 15:18:19 +0100, Robin Becker wrote:
>> Isn't it a bit old fashioned to think everything is connected to a
> The whole concept of stdin and stdout is based on the idea of having a
> console to read from and write to. Otherwise, what would be the point?
> Classic Mac (pre OS X) had no command line interface nothing, and nothing
> even remotely like stdin and stdout. But once you have a console, stdin,
> stdout, and stderr become useful. And once you have them, then you can
> extend the concept using redirection and pipes. But fundamentally, stdin
> and stdout are about consoles.
We can consider "pipes" abstraction to be fundumental. Decades of usage
prove a pipeline of processes usefulness e.g.,
tr -cs A-Za-z '\n' |
tr A-Z a-z |
uniq -c |
sort -rn |
Whether or not a pipe is connected to a tty is a small
detail. stdin/stdout is about pipes, not consoles.