bug-bash
[Top][All Lists]
Advanced

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

``read -N n -t timeout'' saves partial input only when EOF is seen?


From: Clark Wang
Subject: ``read -N n -t timeout'' saves partial input only when EOF is seen?
Date: Thu, 24 Nov 2016 15:57:30 +0800

See following example:

# echo $BASH_VERSION
4.4.5(2)-release
# ( printf 12345 ) | ( read -t 1 -N 10 v; echo "<$v>" )
<12345>
# ( printf 12345; sleep 2 ) | ( read -t 1 -N 10 v; echo "<$v>" )
<>
#

The second "read" did not save "12345" to "v". Is this a bug?

-clark

reply via email to

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