cdxdoc

Count words, lines and characters

USAGE : cdx wc [options...] [files...]

short long description
-a –agg=NewCol,Aggregator Create a new output column with the given aggregator.
-l –lines Shortcut for --agg lines,count
-b –bytes Shortcut for --agg bytes,asum,chars
-c –chars Shortcut for --agg chars,asum,utf8.chars
-w –words Shortcut for --agg words,asum,swords
-f –file=Tri,ColName Should we add the filename as the first column? Default is to do so only when there is more than one output line.
-h –header=Tri Should we add the CDX file header? Default is to do so only when there is more than one column.
-t –total=Tri or only Should we include a line of totals at the bottom? Default is to do so only when there is more than one file. only means to print only the total and not the values for individual files
-o –format=NumberFormat What format should numbers be printed in?

If no output is specified, --lines is assumed.

wc reads each line and feeds it to each aggregator.

Best viewed when piped to cdx tabs

Other useful aggregators

Number Format

home