[Help-bash] How to assign special characters like $'\002' to a variable?
From:
Peng Yu
Subject:
[Help-bash] How to assign special characters like $'\002' to a variable?
Date:
Tue, 5 Feb 2019 19:33:04 -0600
Hi,
I am not able to assign special characters like $'\002' to a variable.
Why is it so? Is there any walk-around? Thanks.
$ x=$'\002'
$ declare -p x
declare -- x=""
--
Regards,
Peng