Re: while /usr/bin/read
am 29.03.2008 22:01:54 von Barry MargolinIn article
> Janis Papanagnou wrote:
>
> > (Frankly, the above examples don't seem to explain much.)
>
> I was replaying to Barry who said that having a corresponding external
> utility for each built-in command was a POSIX requirement. The above does
> not suggest that a "read" external utility is always required. In fact, if
> I read the standard correctly, POSIX never requires that for any builtin.
> It's true, however, that that does not explain why the OP's implementation
> provides /usr/bin/read. My guess is: to avoid breaking scripts run under a
> shell that does not have "read" as a built-in? It seems that would break
> them anyway, only in a different way.
Right. And hasn't "read" been around since the original Bourne shell?
The only shells that presumably don't have them are C-shell derivatives,
whose syntax is so different from Bourne that few non-trivial scripts
could ever work in both.
--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***