is that really a thing for unit files? Why the hell a comment needs escaping?
To avoid having it hosted separately its injected into a shell script as a string
sudo echo "# FYI quotes(") must be escaped with \ like \"
👆 that is not a comment. That is a command that says to echo the text “# FYI quotes(” and then to do
) must be escaped like \ \"
which is invalid syntax.I assume that startup script is reading the contents of the file and trying to echo them into another file? i.e., using the original file as a template, but is not escaping the input, hence the error — which you’re lucky that’s the problem you’re encountering and not something actually destructive like
sudo echo "# foo" && rm -rf /*
.dsygraphia, I meant to say escape the quotes(you can see that because the comment wasn’t about comments but was instead about quotes)
It’s all good. If you’re using bash and readline to read the file, you can use
sudo echo ${INPUT@Q}
(assuming your variable is named $INPUT) to have bash escape things like the quotes and other characters that could get you into trouble.
Fucking systemd istg
I don’t disagree, but this time its my fault
Why are you running echo with sudo? Makes no sense.
there is no purpose other than legacy of having replaced other commands
I’ve gone back and forth between a common bashrc file in my Dropbox folder that is symlinked to ~/.bashrc on my devices, and one that is imported from a regular bashrc instead, and recently it ended up in a state where it accidentally tried to do both, resulting in an endless loop. I discovered this on my Pop!_OS PC, which reacted to this situation by crashing on login lol. What??