In a solution to the question, David Foerster mentions that the following command is incorrectly line-wrapped which introduces line breaks and backspace characters where there should be none:
sudo add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
$(lsb_release -cs) \
stable"
Is it possible to show what exactly is he referring in the command?
We can use
printf
to highlight individual arguments and inspect how the shell tokenizes them. For the command in question vs. the corrected variant in my answer to the linked question (tested in Bash and Dash):and
Oh well, that's not so different. However, this is not what ended up in the repository sources file for the author of the linked question:
I don't know how that happened but it certainly looks like an issue with the back slashes at the line ends. From where else would they come? Maybe the author actually entered a different command or they used a different shell interpreter.