I'm piping output from one command into a second:
mpc listall | mpc add
mpc listall returns the following data (can output 1 or more lines):
Dare - 16 - I´ll Be Your King.mp3
When piping it into the next command, it seems that my shell (Ash on BusyBox) converts the ´ into an asterisk, as I get the error
error adding Dare - 16 - I*ll Be Your King.mp3: No such directory
Manually adding double quotes works! like this:
mpc add "Dare - 16 - I´ll Be Your King.mp3"
So, I tried adding those by sed and awk, but in those cases the backtick gets converted to an asterisk again:
mpc listall | sed 's/^/"/;s/$/"/'
"Dare - 16 - I*ll Be Your King.mp3"
So, question is, is there a way to pass backticks, or actually any character, as is, into another command without conversions?
By the way, obviously, it's quite bad to have this character in the file name in the first place, but I want my code to be robust and able to handle anything thrown at it.