[TUHS] On computerese

Edouard Klein edouardklein at gmail.com
Mon Sep 16 20:59:01 AEST 2024


George Michaelson <ggm at algebras.org> writes:

> cat is capable of endless discussion.
>
> cat thing | cat otherthing doesn't do what (some) people think.
> cat thing | cat otherthing /dev/stdin does, but there's an ordering
> point to be made.
> cat thing | cat < otherthing /dev/stdin makes the ordering point. and
> the number of lines seen.
>


I'm not sure of the point you are making with your last example, which
gave me pause. I had to run it to see what it does.

I correctly guessed that only one of thing or otherthing would be printed,
but I was not able to guess if the | or the < would take precedence.

Is there a simple reason why the < has priority over | for the stdin ?

If the < precedence was your point, why did you specify /dev/stdin ?
cat thing | cat < otherthing
makes the point.

Is there a finer point I am missing ?

Sorry for being dense. I'm happy, after more that 20 years of Unixing,
to see something new even with such supposedly basic commands. Thank you
for your brain twister.


More information about the TUHS mailing list