bug-bash
[Top][All Lists]
Advanced

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

"read -n" miscounts if typed characters are control chars


From: pgf
Subject: "read -n" miscounts if typed characters are control chars
Date: 14 Apr 2005 15:40:12 -0000

Configuration Information [Automatically generated, do not change]:
Machine: i386
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='i386' 
-DCONF_OSTYPE='linux-gnu' -DCONF_MACHTYPE='i386-redhat-linux-gnu' 
-DCONF_VENDOR='redhat' -DSHELL -DHAVE_CONFIG_H  -D_GNU_SOURCE 
-D_FILE_OFFSET_BITS=64  -I.  -I. -I./include -I./lib -I/usr/include -O2 
-march=i386 -mcpu=i686
uname output: Linux grass 2.4.29 #1 Wed Mar 23 09:00:50 EST 2005 i686 unknown
Machine Type: i386-redhat-linux-gnu

Bash Version: 2.05
Patch Level: 8
Release Status: release

Description:
        if "read -n" is used to read control character input from
        a tty, it will miscount the input characters by a factor
        of two.

Repeat-By:
        $ read -n 5 a
        ^A^A^A$ 
        $
        $ echo $a | hexdump -c
        0000000 001 001 001  \n                                                
        0000004





reply via email to

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