I'm running a shell command which returns raw string that is a combination of ASCII and Hex chars. The character it embeds is space-chars in hex. Below is the output:
KINGSTON\x20SV100S2
ST380011A\x20\x20\x20\x20\x20\x20\x20
Maxtor\x206L300S0\x20\x20
How can I replace all the \x20 into single ASCII space character?
Expected output:
KINGSTON SV100S2
ST380011A
Maxtor 6L300S0
P.S the string is stored in a bash variable, hence I would prefer a solution that doesn't input file.