[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
read + ^V
From: |
Antonio Macchi |
Subject: |
read + ^V |
Date: |
Wed, 11 Nov 2009 21:27:04 +0100 |
User-agent: |
Mozilla-Thunderbird 2.0.0.19 (X11/20090103) |
using ^V to pass an ascii character to read, the behavior is incoherent
beetween simple read, and read -nx
$ read
^V^A
$ hd <(echo -n $REPLY)
00000000 01 |.|
00000001
$ read -n1
^V
$ hd <(echo -n $REPLY)
00000000 16 |.|
00000001
$ read -n2
^V^A
(30)[armada:xterm0]/home/user1
$ hd <(echo -n $REPLY)
00000000 16 01 |..|
00000002
I'm on bash 3.2.39
so forgive me if in your new bash this "problem" does not arise
bye
- read + ^V,
Antonio Macchi <=