$ x=$(awk -e 'BEGIN{print "a\000b" }')
-bash: warning: command substitution: ignored null byte in input
$ declare -p x
declare -- x="ab"
I think that there is no way to avoid the above warning as no null
character can be in a bash variable. But if I want to avoid using a
temp file, then I have to have to save the output in a bash variable?
Is there a good way to save some binary data in memory in bash? Thanks.
--
Regards,
Peng