![]() Tabular data handling toolkit |
Command
fldfmt - select fields and output them with formatting
SYNOPSISfldfmt options formatstringDESCRIPTIONfldfmt is a filter utility that selects fields from a stream of records and outputs them to standard output, formatted according to formatstring, once for every input record. Data records should be white-space delimited, tabular ascii format.formatstring may contain data field @names or field @numbers as in the examples below. Inline formatting codes , all of which begin with colon (:) may also be used. Everything else in formatstring is passed through transparently. formatstring may actually be up to 3 command line arguments, which fldfmt will concatenate together. This allows long formatstrings to be split up for readability.
Another utility can select and omit fields is
fldsel(1)
.
OPTIONS-h
-h-
-r format
-bh
-t
-f formatfile
-u
-c
-l
-s
EXAMPLEScat mydata | fmtfld "@1 (@2)" cat mydata | fmtfld "@1 @2 :dec28 @4" dbcat scores | fmtfld -r scores "Name: @firstname @lastname :col40 Score: @score" The following example makes html table rows containing hyperlinks. Assumes that CGIPROG is defined to the URL of the CGI executable using varvalue in the tdh config file. fmtfld "<td><a href=\"@CGIPROG?rtn=people/details&id=@id\"> @fname @lname</a></td></tr>" ENVIRONMENTTDHKIT_CONFIG
|
![]() Tabular data handling toolkit Copyright Steve Grubb |