bug-bash
[Top][All Lists]
Advanced

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

read builtin: timeout setting valid is next read


From: Csaba
Subject: read builtin: timeout setting valid is next read
Date: Wed, 23 Nov 2022 13:52:50 +0100

Hello!

If I use timeout with read shell command, next read command use it too.
See my test shell program:

#!/bin/bash

read -rest 2
od -An -tx1 <<<"${REPLY}"
read -ren2 -p $'-----------------------------------\nIs this OK? [y/N] '
echo
od -An -tx1 <<<"${REPLY}"
[ x"${REPLY,}" != x'y' ] && exit 1
exit 0

In second read command I not use timeout, but have 2s timeout from
first read setting.


bash-5.2.9-3.fc37.x86_64
GNU bash, version 5.2.9(1)-release (x86_64-redhat-linux-gnu)


How reproducible:

See my test script.


Expected results:

The second read is independent of the first.


Additional info:

This problem since bash-5.2. 5.1 versions is OK.

Thanks



reply via email to

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