I have a systemd unit with spaces in an argument
ExecStart=command --argument=\"text text\"
It seems that systemd does not recognize the do
I think recent versions of systemd have started accepting quotes in the middle of arguments, closer to what bash accepts. However, @Tgr's answer is still correct, and it's worth elaborating on. Quoting the entire argument, including the flag name, works here. If you do this:
ExecStart=command "--argument=text text"
Then systemd will understand --argument=text text
as a single positional argument. You don't have to worry about any more splitting happening on that space. You can see the same behavior in bash:
$ echo "--silly-flag=spaces are preserved here"
--silly-flag=spaces are preserved here