I have strings containing percent-escaped characters like %20
and %5B
, and I would like to transform it to "normal" characters like \
for %20
and [
for %5B
.
How can I do that?
I have strings containing percent-escaped characters like %20
and %5B
, and I would like to transform it to "normal" characters like \
for %20
and [
for %5B
.
How can I do that?
The builtin printf in bash has a special format specifier (i.e. %b) which converts \x** to the corresponding value:
Finally, thanks to #bash IRC channel, I found a "not so bad" solution :