read builtin: timeout setting valid is next read

2022-11-23 Thread Csaba
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

bug in 4.2

2014-01-29 Thread Csaba Toth
my enclosed patch. Have a nice day! Csaba --- orig/bash-4.2/general.c 2010-12-12 21:06:27.0 +0100 +++ modified/bash-4.2/general.c 2014-01-29 12:45:49.762326928 +0100 @@ -766,7 +766,7 @@ *nbeg++ = '.'; nlen = nend - ntail; - memcpy (nbeg, ntail, nlen); + memmove(nbeg, n