snippetbashTip
systemd-escape — Escape strings for usage in systemd unit names. More information: <https://www.freedesktop.org/softw
Viewed 0 times
systemdusagecommandstringsescapesystemd-escapeclifor
linux
Problem
How to use the
systemd-escape command: Escape strings for usage in systemd unit names. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemd-escape.html>.Solution
systemd-escape — Escape strings for usage in systemd unit names. More information: <https://www.freedesktop.org/software/systemd/man/latest/systemd-escape.html>.Escape the given text:
systemd-escape {{text}}Reverse the escaping process:
systemd-escape {{[-u|--unescape]}} {{text}}Treat the given text as a path:
systemd-escape {{[-p|--path]}} {{text}}Append the given suffix to the escaped text:
systemd-escape --suffix {{suffix}} {{text}}Use a template and inject the escaped text:
systemd-escape --template {{template}} {{text}}Code Snippets
Escape the given text
systemd-escape {{text}}Reverse the escaping process
systemd-escape {{[-u|--unescape]}} {{text}}Treat the given text as a path
systemd-escape {{[-p|--path]}} {{text}}Append the given suffix to the escaped text
systemd-escape --suffix {{suffix}} {{text}}Use a template and inject the escaped text
systemd-escape --template {{template}} {{text}}Context
tldr-pages: linux/systemd-escape
Revisions (0)
No revisions yet.