[Tabfmt-cvs] tabfmt/doc tabfmt.texi,1.3,1.4
Status: Beta
Brought to you by:
joloc
From: Claudio J. <jo...@us...> - 2006-02-07 17:45:30
|
Update of /cvsroot/tabfmt/tabfmt/doc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16018/doc Modified Files: tabfmt.texi Log Message: <Invoking tabfmt> Option -D accepts a string, not just a character. <Examples> Use `cut' to select the columns in the `/etc/passwd' example. Add another example that does not involve configuration files. Index: tabfmt.texi =================================================================== RCS file: /cvsroot/tabfmt/tabfmt/doc/tabfmt.texi,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** tabfmt.texi 26 Jan 2006 21:19:54 -0000 1.3 --- tabfmt.texi 7 Feb 2006 11:10:39 -0000 1.4 *************** *** 227,233 **** @option{--delimiter}. ! @item -D @var{character} ! @itemx --output-delimiter=@var{character} ! Separate the fields by @var{character} in the output; default is @samp{TAB}. The same backslash-escaped characters are recognized as for the option @option{--delimiter}. --- 227,233 ---- @option{--delimiter}. ! @item -D @var{string} ! @itemx --output-delimiter=@var{string} ! Separate the fields by @var{string} in the output; default is @samp{TAB}. The same backslash-escaped characters are recognized as for the option @option{--delimiter}. *************** *** 290,310 **** This example splits @file{/etc/mtab} (which contains space-separated data), and outputs a tab-delimited table with constant-width ! columns. (You will not find any tabs here if you are reading this manual ! in printed or HTML format.) @example @b{$} awk -F: '( $7 == "/bin/false")' /etc/passwd | ! @b{>} tabfmt -d: -w,,,,15,,0 -D\| -p1 ! Debian-exim | x | 102 | 102 | | /var/spool/exim4 | ! sshd | x | 100 | 65534 | | /var/run/sshd | ! messagebus | x | 101 | 104 | | /var/run/dbus | ! hal | x | 105 | 105 | Hardware abstra | /var/run/hal | ! identd | x | 103 | 65534 | | /var/run/identd | ! gdm | x | 104 | 107 | Gnome Display M | /var/lib/gdm | ! ntop | x | 109 | 109 | | /var/lib/ntop | ! scanlogd | x | 107 | 65534 | | /usr/lib/scanlogd | ! cups-pdf | x | 108 | 65534 | Anonymous Samba | /var/spool/cups-pdf | @end example --- 290,311 ---- This example splits @file{/etc/mtab} (which contains space-separated data), and outputs a tab-delimited table with constant-width ! columns. (You may not find tabs here if you are reading this manual in ! printed or HTML format.) @example @b{$} awk -F: '( $7 == "/bin/false")' /etc/passwd | ! @b{>} cut -d: -f1,3,4,5,6 | ! @b{>} tabfmt -d: -w,,,15, -D\| -p1 ! Debian-exim | 102 | 102 | | /var/spool/exim4 ! sshd | 100 | 65534 | | /var/run/sshd ! messagebus | 101 | 104 | | /var/run/dbus ! hal | 105 | 105 | Hardware abstra | /var/run/hal ! identd | 103 | 65534 | | /var/run/identd ! gdm | 104 | 107 | Gnome Display M | /var/lib/gdm ! ntop | 109 | 109 | | /var/lib/ntop ! scanlogd | 107 | 65534 | | /usr/lib/scanlogd ! cups-pdf | 108 | 65534 | Anonymous Samba | /var/spool/cups-pdf @end example *************** *** 312,318 **** This example first uses @code{awk} to extract from @file{/etc/passwd} those accounts whose login shell is @file{/bin/false}. It then uses ! @code{tabfmt} to produce a human-readable table, truncating user names ! which exceed 20 characters in length, and omitting the login shell, ! which we already know. @node Reporting Bugs, Copying This Manual, Examples, Top --- 313,341 ---- This example first uses @code{awk} to extract from @file{/etc/passwd} those accounts whose login shell is @file{/bin/false}. It then uses ! @code{cut} to print only the login name, uid, gid, user name and home ! directory. Finally, @code{tabfmt} is invoked to produce a human-readable ! table, truncating user names which exceed 20 characters in length. ! ! @example ! ! @b{$} for f in README NEWS AUTHORS THANKS COPYING INSTALL ChangeLog; do ! @b{>} echo -n $f: ! @b{>} ls -1 /usr/share/doc/*/$f 2>/dev/null | wc -l ! @b{>} done | tabfmt -d: -al,r -D" = " ! ! README = 443 ! NEWS = 13 ! AUTHORS = 262 ! THANKS = 51 ! COPYING = 1 ! INSTALL = 2 ! ChangeLog = 0 ! ! @end example ! ! This example demonstrates how to use @code{tabfmt} at the end of a ! pipeline gathering some file statistics. It uses the @option{-a} option ! to right-align the numbers, and the @option{-D} option to set the output ! delimiter to a @samp{=} with spaces around it. @node Reporting Bugs, Copying This Manual, Examples, Top |