SORT.1
资源名称:os_source.zip [点击查看]
上传用户:datang2001
上传日期:2007-02-01
资源大小:53269k
文件大小:2k
源码类别:
操作系统开发
开发平台:
C/C++
- .TH SORT 1
- .SH NAME
- sort - sort a file of ASCII lines
- .SH SYNOPSIS
- fBsortfR [fB-bcdf&imnrufR]fR [fB-tfIcfR] [fB-o fInamefR] [fB+fIpos1fR] [fB-fIpos2fR] fIfilefR ...fR
- .br
- .de FL
- .TP
- \fB\$1\fR
- \$2
- ..
- .de EX
- .TP 20
- \fB\$1\fR
- # \$2
- ..
- .SH OPTIONS
- .FL "-b" "Skip leading blanks when making comparisons"
- .FL "-c" "Check to see if a file is sorted"
- .FL "-d" "Dictionary order: ignore punctuation"
- .FL "-f" "Fold upper case onto lower case"
- .FL "-i" "Ignore nonASCII characters"
- .FL "-m" "Merge presorted files"
- .FL "-n" "Numeric sort order"
- .FL "-o" "Next argument is output file"
- .FL "-r" "Reverse the sort order"
- .FL "-t" "Following character is field separator"
- .FL "-u" "Unique mode (delete duplicate lines)"
- .SH EXAMPLES
- .EX "sort -nr file" "Sort keys numerically, reversed"
- .EX "sort +2 -4 file" "Sort using fields 2 and 3 as key"
- .EX "sort +2 -t: -o out" "Field separator is fI:fP"
- .EX "sort +.3 -.6" "Characters 3 through 5 form the key"
- .SH DESCRIPTION
- .PP
- .I Sort
- sorts one or more files.
- If no files are specified, fIstdinfR is sorted.
- Output is written on standard output, unless fB-ofP is specified.
- The options fB+fIpos1 fB-fIpos2fR use only fields fIpos1fR
- up to but not including fIpos2fR as the sort key, where a field is a
- string of characters delimited by spaces and tabs, unless a different field
- delimiter is specified with fB-tfR.
- Both fIpos1fR and fIpos2fR have the form fIm.nfR where fImfR tells
- the number of fields and fInfR tells the number of characters.
- Either fImfR or fInfR may be omitted.
- .SH "SEE ALSO"
- .BR comm (1),
- .BR grep (1),
- .BR uniq (1).