bug-bash
[Top][All Lists]
Advanced

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

printf "%q" and $'...'


From: Antonio Macchi
Subject: printf "%q" and $'...'
Date: Wed, 25 Nov 2009 08:19:00 +0100
User-agent: Mozilla-Thunderbird 2.0.0.19 (X11/20090103)

Hi, I'm using older bash 3.2.39, so please forgiveme if in your newer bash this issue does not arise.


0x00 and 0x0a has no output in printf "%q"

$ for i in {0..9} a; do printf "%q\n" "`echo -en \"\x0$i\"`"; done
''
$'\001'
$'\002'
$'\003'
$'\004'
$'\005'
$'\006'
$'\a'
$'\b'
$'\t'
''

------------

$'\x00' outputs nothing

hd <(echo $'\x00')
00000000  0a                                                |.|
00000001

------------

$'\x01' outputs twice.

$ hd <(echo -n $'\x01')
00000000  01 01                                             |..|
00000002



thanks for your great job
have a nice day

(God Save Linux!)

bye




reply via email to

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