Re: 'read' sometimes truncates trailing field delimiter
From:
Chet Ramey
Subject:
Re: 'read' sometimes truncates trailing field delimiter
Date:
Mon, 13 Jan 2025 10:08:35 -0500
User-agent:
Mozilla Thunderbird
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.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU chet@case.edu http://tiswww.cwru.edu/~chet/