*nix Documentation Project
·  Home
 +   man pages
·  Linux HOWTOs
·  FreeBSD Tips
·  *niX Forums

  man pages->Linux man pages -> sort (1)              
Title
Content
Arch
Section
 

SORT(1)

Contents


NAME    [Toc]    [Back]

       sort - sort lines of text files

SYNOPSIS    [Toc]    [Back]

       sort [OPTION]... [FILE]...

DESCRIPTION    [Toc]    [Back]

       Write sorted concatenation of all FILE(s) to standard output.

       +POS1 [-POS2]
	      start  a	key  at POS1, end it *before* POS2 (obsolescent) field
	      numbers and character offsets are numbered  starting  with  zero
	      (contrast with the -k option)

       -b     ignore leading blanks in sort fields or keys

       -c     check if given files already sorted, do not sort

       -d     consider only [a-zA-Z0-9 ] characters in keys

       -f     fold lower case to upper case characters in keys

       -g     compare according to general numerical value, imply -b

       -i     consider only [\040-\0176] characters in keys

       -k POS1[,POS2]
	      start  a key at POS1, end it *at* POS2 field numbers and character
 offsets are numbered starting with one (contrast with  zerobased
 +POS form)

       -m     merge already sorted files, do not sort

       -M     compare (unknown) < `JAN' < ... < `DEC', imply -b

       -n     compare according to string numerical value, imply -b

       -o FILE
	      write result on FILE instead of standard output

       -r     reverse the result of comparisons

       -s     stabilize sort by disabling last resort comparison

       -t SEP use SEParator instead of non- to whitespace transition

       -T DIRECTORY
	      use DIRECTORY for temporary files, not $TMPDIR or /tmp

       -u     with  -c:  check	for strict ordering otherwise: output only the
	      first of an equal run

       -z     end lines with 0 byte, not newline, for find -print0

       --help display this help and exit

       --version
	      output version information and exit

       POS is F[.C][OPTS], where F is the field number	and  C	the  character
       position  in  the  field, both counted from one with -k, from zero with
       the obsolescent form.  OPTS is made up of one or more of Mbdfinr;  this
       effectively  disables global -Mbdfinr settings for that key.  If no key
       is given, use the entire line as the key.  With no FILE, or  when  FILE
       is -, read standard input.

AUTHOR    [Toc]    [Back]

       Written by Mike Haertel.

REPORTING BUGS    [Toc]    [Back]

       Report bugs to <bug-textutils@gnu.org>.

COPYRIGHT    [Toc]    [Back]

       Copyright (C) 1999 Free Software Foundation, Inc.
       This is free software; see the source for copying conditions.  There is
       NO warranty; not even for MERCHANTABILITY or FITNESS FOR  A  PARTICULAR
       PURPOSE.

SEE ALSO    [Toc]    [Back]

      
      
       The  full documentation for sort is maintained as a Texinfo manual.  If
       the info and sort programs are properly installed  at  your  site,  the
       command

	      info sort

       should give you access to the complete manual.



GNU textutils 2.0		  August 2001			       SORT(1)
[ Back ]
 Similar pages
Name OS Title
sort OpenBSD sort or merge text files
paste HP-UX merge same lines of several files or subsequent lines of one file
paste IRIX merge same lines of several files or subsequent lines of one file
paste Tru64 Joins corresponding lines of several files or subsequent lines in one file
sort HP-UX sort or merge files
sort IRIX sort and/or merge files
texindex FreeBSD sort Texinfo index files
texindex OpenBSD sort Texinfo index files
apt-sortpkgs Linux Utility to sort package index files
DXmCSTextNumLines Tru64 Retrieves (returns) the number of visible lines in the compound string text widget.
Copyright © 2004-2005 DeniX Solutions SRL
newsletter delivery service