Re: while /usr/bin/read

Re: while /usr/bin/read

am 29.03.2008 22:03:45 von Barry Margolin

In article ,
Janis Papanagnou wrote:

> pk wrote:
> > 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
>
> I was aiming at something different; because I can use the read
> builtin in a special way where the side effects are irrelevant
> (man page examples re-inserted)
>
> (read foo)
> nohup read ...
> find . -exec read ... \;
>
> would that be a sensible rationale to have an external program?
> I think not.

I see -- /bin/read can be used as a way to implement "Please hit RETURN
to continue".

--
Barry Margolin, barmar@alum.mit.edu
Arlington, MA
*** PLEASE don't copy me on replies, I'll read them in the group ***

Re: while /usr/bin/read

am 29.03.2008 22:46:10 von Janis Papanagnou

Barry Margolin wrote:
> In article ,
> Janis Papanagnou wrote:
>
>
>>pk wrote:
>>
>>>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
>>
>>I was aiming at something different; because I can use the read
>>builtin in a special way where the side effects are irrelevant
>>(man page examples re-inserted)
>>
>> (read foo)
>> nohup read ...
>> find . -exec read ... \;
>>
>>would that be a sensible rationale to have an external program?
>>I think not.
>
>
> I see -- /bin/read can be used as a way to implement "Please hit RETURN
> to continue".
>

Yes, that's why I said that "I can use the read builtin in a
special way [...]", but that still doesn't make a sensible
rationale for an external program that may just be used in
those few specific applications like "hit RETURN to continue".

Janis