[Help-bash] Display control characters in the escaped form
From:
Peng Yu
Subject:
[Help-bash] Display control characters in the escaped form
Date:
Tue, 1 Oct 2019 22:24:35 -0500
Hi,
The following bash code shows that declare -p does not print control
characters in escaped form. Is it better to print them in the escaped
form to make the results readable? Thanks.
$ IFS= read -r x <<< $'\001'
$ declare -p x
declare -- x=""
$ xxd <<< "$x"
00000000: 010a ..
--
Regards,
Peng