On 11/24/16 3:08 AM, Clark Wang wrote:
> See following example:
>
> [STEP 100] # echo $BASH_VERSION
> 4.4.5(2)-release
> [STEP 101] # read -N 5 v
> abcd
> [STEP 102] # printf '%q\n' "$v"
> $'abcd\n'
> [STEP 103] # read -N 5 v
>
>
> abc[STEP 104] # printf '%q\n' "$v"
> abc
> [STEP 105] #
>
> The
See following example:
[STEP 100] # echo $BASH_VERSION
4.4.5(2)-release
[STEP 101] # read -N 5 v
abcd
[STEP 102] # printf '%q\n' "$v"
$'abcd\n'
[STEP 103] # read -N 5 v
abc[STEP 104] # printf '%q\n' "$v"
abc
[STEP 105] #
The second read did not return the leading "\n"s. According to the manual