See following example:

[STEP 100] # echo $BASH_VERSION
4.4.5(2)-release
[STEP 101] # read -N 5 v
abcd<ENTER>
[STEP 102] # printf '%q\n' "$v"
$'abcd\n'
[STEP 103] # read -N 5 v
<ENTER>
<ENTER>
abc[STEP 104] # printf '%q\n' "$v"
abc
[STEP 105] #

The second read did not return the leading "\n"s. According to the manual
of read -N, "the result is not split on the characters in IFS" but I'm not
sure how to understand this. Is the behavior correct?

Thanks.

-clark

Reply via email to