adelton

cssort

Czech sort

Format

cssort [ -clist | -flist [-dregexp]] [files ...]

Synopsis

cssort -c10-15,50-,25-45 < file 
cssort -f3,5-6 < file 
cssort -f3,5-6 -s: < file 

Description

Cssort is a utility that sorts input lines according to rules used in the Czech language. You can run it without any options, then it just uses whole lines for sorting. With the options, it's possible to specify parts of the lines to be used for comparison.

list

A comma-separated list of integer field numbers or field ranges. The are indexed from 1 and if a range is open (eg. 5-), it means all remaining fields from the starting number.

-c

Stands for columns and the list that follows specifies byte ranges on the line. You will probably use this option to sort data with fixed width fields.

-f

Fields that will be used for sort.

-d

Delimiter that separates fields in the -f option. It is a Perl regular expression, the default is [ \t]+, which means any number of spaces or tabs in a row.

The program assumes ISO-8859-2 encoding. Some way to specify another input encoding will come in the next versions. If you need to sort files with different encodings, you might want to check the cstocs conversion utility.

See also

Cz::Sort(3), cstocs(1).

Author

Jan Pazdziora, jpx (dash) perl (at) adelton (dot) com.