SORT(1)                          User Commands
SORT(1)



NNAAMMEE
       sort - sort lines of text files

SSYYNNOOPPSSIISS
       ssoorrtt [_O_P_T_I_O_N]... [_F_I_L_E]...

DDEESSCCRRIIPPTTIIOONN
       Write sorted concatenation of all FILE(s) to standard
       output.

       Mandatory  arguments  to  long  options are mandatory
       for short options too.  Ordering options:

       --bb,
       ----iiggnnoorree--lleeaaddiinngg--bbllaannkkss
              ignore leading blanks

       --dd,
       ----ddiiccttiioonnaarryy--oorrddeerr
              consider only blanks and alphanumeric characters

       --ff, ----iiggnnoorree--ccaassee
              fold lower case to upper case characters

       --gg,
       ----ggeenneerraall--nnuummeerriicc--ssoorrtt
              compare according to general numerical value

       --ii,
       ----iiggnnoorree--nnoonnpprriinnttiinngg
              consider only printable characters

       --MM, ----mmoonntthh--ssoorrtt
              compare (unknown) < `JAN' < ... < `DEC'

       --nn, ----nnuummeerriicc--ssoorrtt
              compare according to string numerical value

       --RR, ----rraannddoomm--ssoorrtt
              sort by random hash of keys

       ----rraannddoomm--ssoouurrccee=_F_I_L_E
              get random bytes from FILE (default /dev/urandom)

       --rr, ----rreevveerrssee
              reverse the result of comparisons

       Other options:

       --cc, ----cchheecckk
              check whether input is sorted; do not sort

       --kk, ----kkeeyy=_P_O_S_1_[,POS2]
              start a key at POS1, end it at POS2 (origin 1)

       --mm, ----mmeerrggee
              merge already sorted files; do not sort

       --oo, ----oouuttppuutt=_F_I_L_E
              write result to FILE instead of standard output

       --ss, ----ssttaabbllee
              stabilize sort by disabling last-resort
              comparison

       --SS,
       ----bbuuffffeerr--ssiizzee=_S_I_Z_E
              use SIZE for main memory buffer

       --tt,
       ----ffiieelldd--sseeppaarraattoorr=_S_E_P
              use SEP instead of non-blank to blank transition

       --TT,
       ----tteemmppoorraarryy--ddiirreeccttoorryy=_D_I_R
              use DIR for temporaries, not $TMPDIR or /tmp;
              multiple  options specify multiple directories

       --uu, ----uunniiqquuee
              with  --cc, check for strict ordering; without
              --cc, output only the first of an equal run

       --zz,
       ----zzeerroo--tteerrmmiinnaatteedd
              end lines with 0 byte, not newline

       ----hheellpp display this help and exit

       ----vveerrssiioonn
              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 are
       origin 1.  If neither --tt nor --bb is in effect,
       characters in a field are counted from  the  beginning
       of  the preceding  whitespace.   OPTS  is  one  or
       more single-letter ordering options, which override
       global ordering options for that  key.   If  no key
       is given, use the entire line as the key.

       SIZE  may be followed by the following multiplicative
       suffixes: % 1% of memory, b 1, K 1024 (default),
       and so on for M, G, T, P, E, Z, Y.

       With no FILE, or when FILE is -, read standard input.

       *** WARNING *** The locale specified by the  environment
       affects  sort order.  Set LC_ALL=C to get the
       traditional sort order that uses native byte values.

AAUUTTHHOORR
       Written by Mike Haertel and Paul Eggert.

RREEPPOORRTTIINNGG BBUUGGSS
       Report bugs to <bug-coreutils@gnu.org>.

CCOOPPYYRRIIGGHHTT
       Copyright © 2006 Free Software Foundation, Inc.
       This is free software.  You may redistribute
       copies  of  it  under  the terms       of
       the      GNU      General      Public      License
       <http://www.gnu.org/licenses/gpl.html>.  There is NO
       WARRANTY,  to  the extent permitted by law.

SSEEEE AALLSSOO
       The  full documentation for ssoorrtt is
       maintained as a Texinfo manual.  If the iinnffoo
       and ssoorrtt programs are properly installed  at
       your  site,  the command

              iinnffoo ssoorrtt

       should give you access to the complete manual.



sort 6.7                         December 2006
SORT(1)
