help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Strange behaviour of read builtin


From: Greg Wooledge
Subject: Re: Strange behaviour of read builtin
Date: Wed, 1 Jul 2020 07:25:23 -0400
User-agent: Mutt/1.10.1 (2018-07-13)

On Wed, Jul 01, 2020 at 07:51:00AM +0300, M. Nejat AYDIN wrote:
> Is this intended behaviour of read builtin? If so where is it
> documented? The Bash Reference Manual says only "If no names
> are supplied, the line read is assigned to the variable REPLY."

There you go.  That is where it's documented.  (That sentence also
appears in the man page, at the end of the description of the read
builtin.)

> There is no mention of preserving leading and trailing white
> spaces.

How else would you interpret "the line read is assigned to the variable
REPLY"?  Read the line, assign it to the variable.  Do not pass Go,
do not perform IFS whitespace trimming.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]