On 1/13/25 2:02 PM, Steffen Nurpmeso wrote:
Chet Ramey wrote in <ced8e10a-fa33-4c93-9394-a64616914...@case.edu>: |On 1/12/25 6:25 PM, Steffen Nurpmeso wrote: | |> Should be doable for bash in the "no-argument" case, which |> currently works though POSIX requires at least one argument: | |If `read' isn't supplied any variable name arguments, bash assigns the |unmodified line, without any trailing delimiter, to REPLY. This is long- |standing documented behavior.Ah. I did not know that. I try to avoid any non-portable thing. (But only to note it also worked in --posix mode.)
It's a POSIX application requirement to supply VAR. If it's not there, POSIX makes it an error. Shells can extend POSIX in error cases. In this instance, bash and ksh93 extend POSIX in different ways. Chet -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature