On Mon, Jan 15, 2018 at 02:26:19PM +0800, Clark Wang wrote:
> See following example:
> 
> [STEP 100] # echo $BASH_VERSION
> 4.4.12(4)-release
> [STEP 101] # set -- $'\001'
> [STEP 102] # v=$*
> [STEP 103] # printf '%q\n' "$v"
> $'\001\001'
> [STEP 104] #

Confirmed (with default IFS; it is important to note that).  And also
for the record, v="$*" gives the expected result.

wooledg:~$ v="$*"
wooledg:~$ printf '%q\n' "$v"
$'\001'

Just another case of "never ever EVER use unquoted $* or $@", for us
script writers.  Chet may still choose to address it as a bash bug,
of course.

Reply via email to