The Unix Heritage Society mailing list
 help / color / mirror / Atom feed
* [TUHS] etymology of read -u
@ 2016-05-31  7:27 Doug McIlroy
  2016-05-31 12:55 ` Chet Ramey
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Doug McIlroy @ 2016-05-31  7:27 UTC (permalink / raw)


What's the mnmonic significance, if any, of the u in
the bash builtin read -u for reading from a specified
file descriptor? Evidently both f and d had already been
taken in analogy to usage in some other commands.

The best I can think of is u as in "tape unit", which
was common usage back in the days of READ INPUT TAPE 5.
That would make it the work of an old timer, maybe Dave Korn?



^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
  2016-05-31  7:27 [TUHS] etymology of read -u Doug McIlroy
@ 2016-05-31 12:55 ` Chet Ramey
  2016-05-31 14:35 ` Joerg Schilling
       [not found] ` <CAEoi9W4YTdJ2bJyAKVQqpd48bTLv7GANrtAK271oXnibuo8v6A@mail.gmail.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Chet Ramey @ 2016-05-31 12:55 UTC (permalink / raw)


On 5/31/16 3:27 AM, Doug McIlroy wrote:
> What's the mnmonic significance, if any, of the u in
> the bash builtin read -u for reading from a specified
> file descriptor? Evidently both f and d had already been
> taken in analogy to usage in some other commands.
> 
> The best I can think of is u as in "tape unit", which
> was common usage back in the days of READ INPUT TAPE 5.
> That would make it the work of an old timer, maybe Dave Korn?

I picked it up from ksh many years ago, and assumed at the time that it
meant `unit'.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
		 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    chet at case.edu    http://cnswww.cns.cwru.edu/~chet/


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
  2016-05-31  7:27 [TUHS] etymology of read -u Doug McIlroy
  2016-05-31 12:55 ` Chet Ramey
@ 2016-05-31 14:35 ` Joerg Schilling
       [not found] ` <CAEoi9W4YTdJ2bJyAKVQqpd48bTLv7GANrtAK271oXnibuo8v6A@mail.gmail.com>
  2 siblings, 0 replies; 7+ messages in thread
From: Joerg Schilling @ 2016-05-31 14:35 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 637 bytes --]

Doug McIlroy <doug at cs.dartmouth.edu> wrote:

> What's the mnmonic significance, if any, of the u in
> the bash builtin read -u for reading from a specified
> file descriptor? Evidently both f and d had already been
> taken in analogy to usage in some other commands.

It seems to be a copy from ksh.

Ksh implements a private "print" builtin that also uses -u fd.

Jörg

-- 
 EMail:joerg at schily.net                  (home) Jörg Schilling D-13353 Berlin
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
       [not found]   ` <CAPz8ZkZjLr1Uj-3VLKK1n5xZq=eeHh+HBeTNHbDVxVTKH+CvCw@mail.gmail.com>
@ 2016-05-31 15:57     ` Dan Cross
  2016-05-31 16:49       ` Joerg Schilling
  0 siblings, 1 reply; 7+ messages in thread
From: Dan Cross @ 2016-05-31 15:57 UTC (permalink / raw)


I asked Jeff Korn (David Korn's son), who in turn asked David Korn who
confirmed that 'read -u' comes from ksh and that 'u' stands for 'unit'.

        - Dan C.
Yes, indeed. He says:

*I added -u when I added co processes in the mid '80s.  The u stands for
unit.  It was command to talk about file descriptor unit at that time.*

On Tue, May 31, 2016 at 6:06 AM, Dan Cross <crossd at gmail.com> wrote:

> Hey, did your dad do `read -u`?
>
> ---------- Forwarded message ----------
> From: Doug McIlroy <doug at cs.dartmouth.edu>
> Date: Tue, May 31, 2016 at 3:27 AM
> Subject: [TUHS] etymology of read -u
> To: tuhs at minnie.tuhs.org
>
>
> What's the mnmonic significance, if any, of the u in
> the bash builtin read -u for reading from a specified
> file descriptor? Evidently both f and d had already been
> taken in analogy to usage in some other commands.
>
> The best I can think of is u as in "tape unit", which
> was common usage back in the days of READ INPUT TAPE 5.
> That would make it the work of an old timer, maybe Dave Korn?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://minnie.tuhs.org/pipermail/tuhs/attachments/20160531/b0843289/attachment.html>


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
  2016-05-31 15:57     ` Dan Cross
@ 2016-05-31 16:49       ` Joerg Schilling
  0 siblings, 0 replies; 7+ messages in thread
From: Joerg Schilling @ 2016-05-31 16:49 UTC (permalink / raw)


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 565 bytes --]

Dan Cross <crossd at gmail.com> wrote:

> I asked Jeff Korn (David Korn's son), who in turn asked David Korn who
> confirmed that 'read -u' comes from ksh and that 'u' stands for 'unit'.

Thank you for your reply....

Is this "the method" ;-) to get a reply from David since he works at Google?

Jörg

-- 
 EMail:joerg at schily.net                  (home) Jörg Schilling D-13353 Berlin
       joerg.schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/
 URL:  http://cdrecord.org/private/ http://sourceforge.net/projects/schilytools/files/'


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
@ 2016-06-01  4:17 Doug McIlroy
  0 siblings, 0 replies; 7+ messages in thread
From: Doug McIlroy @ 2016-06-01  4:17 UTC (permalink / raw)


> I asked Jeff Korn
There's nothing like primary sources. Thanks, Dan.

Doug


^ permalink raw reply	[flat|nested] 7+ messages in thread

* [TUHS] etymology of read -u
@ 2016-06-01  4:14 Doug McIlroy
  0 siblings, 0 replies; 7+ messages in thread
From: Doug McIlroy @ 2016-06-01  4:14 UTC (permalink / raw)


> I asked Jeff Korn 
There's nothing like primary sources. Thanks, Dan.

doug


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-06-01  4:17 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-05-31  7:27 [TUHS] etymology of read -u Doug McIlroy
2016-05-31 12:55 ` Chet Ramey
2016-05-31 14:35 ` Joerg Schilling
     [not found] ` <CAEoi9W4YTdJ2bJyAKVQqpd48bTLv7GANrtAK271oXnibuo8v6A@mail.gmail.com>
     [not found]   ` <CAPz8ZkZjLr1Uj-3VLKK1n5xZq=eeHh+HBeTNHbDVxVTKH+CvCw@mail.gmail.com>
2016-05-31 15:57     ` Dan Cross
2016-05-31 16:49       ` Joerg Schilling
2016-06-01  4:14 Doug McIlroy
2016-06-01  4:17 Doug McIlroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).