Say I have to use quotes to encapsulate subshell output like:
DATA="$(cat file.hex | xxd -r)"
But I need to nest this kind of stuff like:
DATA="$(cat file.hex | xxd -r | tr -d \"$(cat trim.txt)\")"
I can't use single quotes because those do not expand variables that are inside of them. Escaping quotes doesn't work because they are just treated as passive text.
How do I handle this?