8 awk-cut - Select fields from input stream with awk
12 awk-cut [B<COLUMNS-SPEC>]
14 Where B<COLUMNS-SPEC> is a variation of these:
22 =item B<COLUMN>-B<COLUMN>
24 =item B<COLUMN>[,B<COLUMN>[,B<COLUMN>[,...]]]
48 expr=$expr"printf \"%s\", RS;"
68 expr=$expr"N=0; split(\"$colspec\", A, /,/); for(X in A){printf(\"%s%s\", N==0 ? \"\" : OFS, \$A[X]); N++};"
71 echo "Invalid column spec: $colspec" >&2
77 expr=$expr"for(F=$x;F<=$y;F++) printf(\"%s%s\", F==$x ? \"\" : OFS, \$F);"
83 awk "{ $expr printf \"%s\", RS; }"