X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=man%2Fsystemd.service.xml;h=50ff2f5bd5ac71d30fcc32b3ef233c8b063380c6;hb=654c2d478f50ffbb367dbdc3745f795fcc34574b;hp=dbc82edbd47bbcf0e56662faaa3a2abf59b6daa4;hpb=30d88d54f613f9f7831172876ebfd9e285fb043b;p=elogind.git diff --git a/man/systemd.service.xml b/man/systemd.service.xml index dbc82edbd..50ff2f5bd 100644 --- a/man/systemd.service.xml +++ b/man/systemd.service.xml @@ -1215,13 +1215,39 @@ contains, resulting in a single argument. Use $FOO as a separate word on the command line, in which case it will be replaced by the - value of the environment variable split at whitespace, - resulting in zero or more arguments. To pass a literal - dollar sign, use $$. Variables - whose value is not known at expansion time are treated - as empty strings. Note that the first argument - (i.e. the program to execute) may not be a - variable. + value of the environment variable split at whitespace + resulting in zero or more arguments. For this type of + expansion, quotes and respected when splitting into + words, and afterwards removed. + + Example: + + Environment="ONE=one" 'TWO=two two' +ExecStart=/bin/echo $ONE $TWO ${TWO} + + This will execute /bin/echo + with four arguments: one, + two, two, and + two two. + + Example: + Environment=ONE='one' "TWO='two two' too" THREE= +ExecStart=/bin/echo ${ONE} ${TWO} ${THREE} +ExecStart=/bin/echo $ONE $TWO $THREE + This results in echo being + called twice, the first time with arguments + 'one', + 'two two' too, , + and the second time with arguments + one, two two, + too. + + + To pass a literal dollar sign, use + $$. Variables whose value is not + known at expansion time are treated as empty + strings. Note that the first argument (i.e. the + program to execute) may not be a variable. Variables to be used in this fashion may be defined through Environment= and @@ -1259,16 +1285,6 @@ >/dev/null, &, ;, and /bin/ls. - - Example: - - Environment="ONE=one" 'TWO=two two' -ExecStart=/bin/echo $ONE $TWO ${TWO} - - This will execute /bin/echo - with four arguments: one, - two, two, and - two two.