Available in

(1) (1)/de (1)/fi (1)/fr (1)/hu (1)/ja (1)/ko (1)/pl (1)/tr (1)/zh_CN (1)/zh_TW (1posix) (3o) (3perl)

TOC

SORT(1)                                                                SORT(1)



sort -

sort

       [-cm]  [-bdfginruzM]  [+POS1[-POS2]  [-o  OUTFILE]  [-t  SEPARATOR] [-k
       POS1[,POS2]  [-K  POS1[,POS2]  [-S  SIZE]  [-T   TEMPDIR]   [--reverse]
       [FILE...]

       sort [--help] [--version]

sort

       FILE

       FILE

       FILE

       `-'


       GNU sort
        ( GNU )


       sort



       sort
        2


       TMPDIR

       sort
        /tmp

       -T TEMPDIR



       -k  +

       F.C
        F C  (+POS )
        (-POS ) .C -b
        .C
        (+POS )

       (-POS )


        (output ordering option)

       -b
        +POS  -POS

       -b





   sort
       -c

               1


       -m



              ()



       sort





        `-bdfinrM'

       sort


        ( ) sort
        LC_COLLATE
        1

       -r

       -s
        (stable )


       -s



   sort
       -b

       -d


       -f
               `b'  `B'

       -g     strtod(3)

               (`1.0e-34'  `10e100' )


              -n



              0


       -i

       -n      ()
               -  () 0
               0  ()

              sort

               C  double 2 (radix point) 1

              2 double ( integer )

               double
               16

               `+'

              -g


       -r, --reverse



       -M      3
               `JAN' < `FEB' < ... < `DEC'




       +POS1[-POS2]
               obosolete POS1  POS2

              POS2 POS2
               0

       -k POS1[,POS2]
              -K POS1[,POS2]
               POSIX POS1  POS2

              POS2 POS2
               0

       -o OUTFILE

              OUTFILE

              OUTFILE

              sort

              OUTFILE


       -t SEPARATOR

              SEPARATOR



              (empty string)
               ` foo bar' sort
               ` foo'  ` bar'



       -u      -m

              -c



       -z     <LF> () <NUL> ()
               `perl -0'  `find -print0'
               `xargs -0'

              ()

       -S SIZE
              SIZE KB
               ()

       -T TEMPDIR
              TEMPDIR


              TMPDIR -T



       --help

       --version


+>o  ()
              sort -nr

       +>o  1 2
        3

              sort -k3

       +>o  2
        5  3 4
        `:'

              sort -t : -k 2,2n -k 5.3,5.4

       `-k 2,2'  `-k 2' sort
        2

       1


       `n'
        `-k 2n,2'  `-k 2n,2n' `b'


       +>o  5
        5
        3  ID

              sort -t : -k 5b,5 -k 3,3n /etc/passwd

        -n

              sort -t : -n -k 5b,5 -k 3,3 /etc/passwd

       +>o  tags

              find src -type f -print0 | sort -t / -z -f |
              xargs -0 etags --append

        `-print0', `-z', `-0'  (line feed)


       +>o
        1  `b'

              sort -t : -n -k 5b,5b -k 3,3 /etc/passwd

        -n  -b
        2  `n'

              sort -t : -b -k 5,5 -k 3,3n /etc/passwd


 B
       10  D

        `1KB'  `1024' `1KD'  `1000'
        b (512 )c (1 ) w ( - System V  2 4.2BSD  4 )  3
        B  D


       k      :  2^10 = 102410  10^3 = 1000

       M      : 2^20 = 1,048,576  10^6 = 1,000,000

       G      : 2^30 = 1,073,741,824  10^9 = 1,000,000,000

       T      : 2^40 = 1,099,511,627,776  10^12 = 1,000,000,000,000

       P      : 2^50 = 1,125,899,906,842,624
               10^15 = 1,000,000,000,000,000

       E      : 2^60 = 1,152,921,504,606,846,976
               10^18 = 1,000,000,000,000,000,000

       Z      : 2^70 = 1,180,591,620,717,411,303,424
               10^21 = 1,000,000,000,000,000,000,000

       Y      : 2^80 = 1,208,925,819,614,629,174,706,176
               10^24 = 1,000,000,000,000,000,000,000,000

sort

        (BSD  System V )
        ( -b, -f, -n)
        POSIX -n -b
        -M


        -b


       LC_COLLATE
              ()


       LC_CTYPE
              -b, -d, -f, -i


       LC_NUMERIC
               (, )

       LC_TIME
               -M

 bug-textutils [AT] gnu.org
       man  Ragnar Hojland Espinosa <ragnar [AT] ragnar-hojland.net>




GNU textutils 2.1               7 October 2002                         SORT(1)

COMMENTS

Add your comment here. Whitespace and linebreaks are preserved. URLs are linked automatically.
CAPTCHA

No HTML allowed. URLs will be linked with nofollow attribute. Whitespace is preserved.