|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From 5d9a2698e74eefc20ea7cbbaeaffb566e398f2ba Mon Sep 17 00:00:00 2001
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
From: =?UTF-8?q?Zbigniew=20J=C4=99drzejewski-Szmek?= <zbyszek@in.waw.pl>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Date: Tue, 7 Oct 2014 09:19:41 -0400
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
Subject: [PATCH] man: document stripping of quotes
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
---
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
man/systemd.service.xml | 50 ++++++++++++++++++++++++++++++++-----------------
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
1 file changed, 33 insertions(+), 17 deletions(-)
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
diff --git a/man/systemd.service.xml b/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
index dbc82edbd4..50ff2f5bd5 100644
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
--- a/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+++ b/man/systemd.service.xml
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -1215,13 +1215,39 @@
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
contains, resulting in a single argument. Use
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<literal>$FOO</literal> as a separate word on the
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
command line, in which case it will be replaced by the
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- value of the environment variable split at whitespace,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- resulting in zero or more arguments. To pass a literal
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- dollar sign, use <literal>$$</literal>. Variables
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- whose value is not known at expansion time are treated
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- as empty strings. Note that the first argument
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- (i.e. the program to execute) may not be a
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- variable.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ value of the environment variable split at whitespace
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ resulting in zero or more arguments. For this type of
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ expansion, quotes and respected when splitting into
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ words, and afterwards removed.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <para>Example:</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <programlisting>Environment="ONE=one" 'TWO=two two'
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <para>This will execute <command>/bin/echo</command>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ with four arguments: <literal>one</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>two</literal>, <literal>two</literal>, and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>two two</literal>.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <para>Example:</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <programlisting>Environment=ONE='one' "TWO='two two' too" THREE=
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ExecStart=/bin/echo ${ONE} ${TWO} ${THREE}
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ExecStart=/bin/echo $ONE $TWO $THREE</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <para>This results in <filename>echo</filename> being
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ called twice, the first time with arguments
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>'one'</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>'two two' too</literal>, <literal></literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ and the second time with arguments
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>one</literal>, <literal>two two</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>too</literal>.
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ </para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <para>To pass a literal dollar sign, use
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ <literal>$$</literal>. Variables whose value is not
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ known at expansion time are treated as empty
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ strings. Note that the first argument (i.e. the
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
+ program to execute) may not be a variable.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<para>Variables to be used in this fashion may be
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
defined through <varname>Environment=</varname> and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
@@ -1259,16 +1285,6 @@
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<literal>>/dev/null</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<literal>&</literal>, <literal>;</literal>, and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<literal>/bin/ls</literal>.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- <para>Example:</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- <programlisting>Environment="ONE=one" 'TWO=two two'
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-ExecStart=/bin/echo $ONE $TWO ${TWO}</programlisting>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
-
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- <para>This will execute <command>/bin/echo</command>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- with four arguments: <literal>one</literal>,
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- <literal>two</literal>, <literal>two</literal>, and
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
- <literal>two two</literal>.</para>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
</refsect1>
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
|
|
Zbigniew Jędrzejewski-Szmek |
62fe94 |
<refsect1>
|