dfree example
Harald Koenig
H.Koenig at science-computing.de
Wed Oct 17 08:37:30 GMT 2007
Hello SAMBA,
almost exactly 3 years ago I send you this report/patch for problems
with your example for "dfree"
http://lists.samba.org/archive/samba-technical/2003-October/032414.html
now I was asked/bitten again by this problem and realize that it never was
changed in samba:
# grep -r 'tail -1' samba-3.0.26a/docs
samba-3.0.26a/docs/htmldocs/manpages/smb.conf.5.html:df $1 | tail -1 | awk '{print $2" "$4}'
samba-3.0.26a/docs/htmldocs/manpages/smb.conf.5.html:/usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
samba-3.0.26a/docs/htmldocs/using_samba/ch11.html:df $1 | tail -1 | awk '{print $2" "$4}'</pre></blockquote>
samba-3.0.26a/docs/htmldocs/using_samba/ch11.html:/usr/bin/df $1 | tail -1 | awk '{print $3" "$5}'</pre></blockquote>
samba-3.0.26a/docs/manpages/smb.conf.5:df $1 | tail -1 | awk '{print $2" "$4}'
samba-3.0.26a/docs/manpages/smb.conf.5:/usr/bin/df -k $1 | tail -1 | awk '{print $3" "$5}'
so I try again....
On Oct 23 2003, Harald Koenig wrote:
> Hi samba,
>
> dfreecommand.xml gives a small script example for a "dfree" command.
>
> this sample script will fail if the output of "df" got split into
> two lines because of long first argument (e.g. when using long LVM
> vaolume names or for NFS mounts...).
>
> here is a better sample without this problem (and with less "quotes":):
>
> --- samba-3.0.0/docs/docbook/smbdotconf/misc/dfreecommand.xml~ Thu Oct 23 13:51:39 2003
> +++ samba-3.0.0/docs/docbook/smbdotconf/misc/dfreecommand.xml Thu Oct 23 13:51:51 2003
> @@ -37,7 +37,7 @@
>
> <para><programlisting format="linespecific">
> #!/bin/sh
> -df $1 | tail -1 | awk '{print $2" "$4}'
> +df $1 | tail -1 | awk '{print $(NF-4),$(NF-2)}'
> </programlisting></para>
>
> <para>or perhaps (on Sys V based systems):</para>
>
>
> Harald Koenig
Harald Koenig
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig \/\/\/\/\/\/\/\/\/
science+computing ag // / \\ \
koenig at science-computing.de ^^^^^ ^^^^^
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Florian Geyer,
Dr. Roland Niemeier, Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Prof. Dr. Hanns Ruder
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196
More information about the samba-technical
mailing list