by seodisparate · 2y ago · 0 comments
$ TEST_VAR="$(printf 'first\0second')"
bash: warning: command substitution: ignored null byte in input
I'm not familiar with working with null characters in Bash in this way, but I think there might be a way to do it.One option with shells is some set/get functions that encode/decode to base64, hex, etc. Feels pretty clunky though.