On Wed, Feb 05, 2003 at 11:33:21AM -0500, Bob Mariotti wrote: > When sorting a file with "sort" (unix sort) is there any way to truncate > the output to a maximum number of bytes per record???? > > Example: sort -k 81.5,11.119 -z 80 -o fileout filein > > This would read the input file of approx 81 bytes and write the output > file at only 80 bytes.
You can pipe the output of sort to cut: $ sort -k 81.5,11.119 filein | cut -c 40 > fileout Hope this helps, -E _______________________________________________ Boston-pm mailing list [EMAIL PROTECTED] http://mail.pm.org/mailman/listinfo/boston-pm

