[Cialug] Random nerd fact
Don Ellis
don.ellis at gmail.com
Fri Jul 27 20:10:32 UTC 2018
On Thu, Jul 26, 2018 at 8:15 AM Todd Walton <tdwalton at gmail.com> wrote:
> On Wed, Jul 25, 2018 at 7:47 PM, Kyle H <khamil8686 at gmail.com> wrote:
>
> > |& redirects stdout and stderr of one command to the input of another?
> > Alias for 2>&1 |
> >
> > Echo test |& less
> > Echo test 2>&1 | less
> >
> > Just thought as interesting and helpful :)
> >
>
> Can be very useful! I usually go for the " 2>&1 | " style because I can
> work it out in my head, the symbols are internally consistent, etc. It
> trains me to remember the syntax of all that, which I still have to look up
> once in a while.
>
> --
> Todd
>
I agree with Todd. Young people being introduced to this world will learn
the shortcut without any grasp of what it means and won't be able to build
the other constructs available if you see what's going on.
Reducing six keystrokes to two is a worthy goal, but has its costs.
If you want real terseness, try APL (A Programming Language). All words
we're used to seeing were expressed as Greek symbols, which were shifts of
the normal lower case keyboard. We used Selectric typewriters with either
specially printed keyboards or a little reference card attached above the
keyboard (typeballs were replaced with APL typeballs). In terms of
programming latency, while a COBOL program can be read years later with
perfect understanding, and APL programmer could have trouble reading his
own work within minutes (or seconds) of having written it.
Sorry for the divergence, I just want to point out that brevity has its
costs...
--Don
More information about the Cialug
mailing list