summaryrefslogtreecommitdiff
path: root/docs-xml
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2019-05-18 11:41:56 -0700
committerJeremy Allison <jra@samba.org>2019-05-24 20:12:01 +0000
commit77eabd74e9a28b1e6decf0890a9ef4c83fa002d4 (patch)
tree334cd3f98ff1129f28b42ef7437b3e87b5127e36 /docs-xml
parent9fa95d5b45369acfdd38923e8618e94e5d04b07e (diff)
downloadsamba-77eabd74e9a28b1e6decf0890a9ef4c83fa002d4.tar.gz
docs: dfree command. Correct usage of dfree scripts.
Add quotes to the sample scripts to prevent incorrect parameter usage. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13964 Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Jeremy Allison <jra@samba.org> Autobuild-Date(master): Fri May 24 20:12:02 UTC 2019 on sn-devel-184
Diffstat (limited to 'docs-xml')
-rw-r--r--docs-xml/smbdotconf/misc/dfreecommand.xml6
1 files changed, 4 insertions, 2 deletions
diff --git a/docs-xml/smbdotconf/misc/dfreecommand.xml b/docs-xml/smbdotconf/misc/dfreecommand.xml
index a678bb44adf..a1eed4948a6 100644
--- a/docs-xml/smbdotconf/misc/dfreecommand.xml
+++ b/docs-xml/smbdotconf/misc/dfreecommand.xml
@@ -40,14 +40,16 @@
Where the script dfree (which must be made executable) could be:
<programlisting format="linespecific">
#!/bin/sh
-df $1 | tail -1 | awk '{print $(NF-4),$(NF-2)}'
+df "$1" | tail -1 | awk '{print $(NF-4),$(NF-2)}'
</programlisting>
or perhaps (on Sys V based systems):
<programlisting format="linespecific">
#!/bin/sh
-/usr/bin/df -k $1 | tail -1 | awk '{print $3&quot; &quot;$5}'
+/usr/bin/df -k "$1" | tail -1 | awk '{print $3&quot; &quot;$5}'
</programlisting>
Note that you may have to replace the command names with full path names on some systems.
+ Also note the arguments passed into the script should be quoted inside the script in case they
+ contain special characters such as spaces or newlines.
</para>
<para>