home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / pc / doshelp / helpsb.zoo / help / sort / examples.hlp next >
Encoding:
Text File  |  1989-01-01  |  1.9 KB  |  36 lines

  1. SAMPLE SORT command results    | Comments about the output
  2.  
  3.   SORT                           In this example, "Its now 1 AM.Ctrl-Z" was
  4.   Its                            typed in, one word on a line, pressing Enter
  5.   now                            after each word. The Ctrl-Z told SORT that
  6.   1                              you were done entering the input. SORT then
  7.   AM.                            proceeded to display the sorted output on the
  8.   Ctrl-Z                         screen, one line at a time. If SORT/R had
  9. 1                                been used, instead of SORT, the output would
  10. AM.                              have been displayed in the reverse order, 
  11. Its                              with "now" as the first line.
  12. now
  13.  
  14.   SORT/R <TEXTFILE.TXT           This reads input from TEXTFILE.TXT, which
  15. This is line 3                   contains three lines of text, sorts them in
  16. This is line 2                   reverse alphanumeric order and displays the
  17. This is line 1                   results on the screen.
  18.  
  19.   SORT <MAILLIST.TXT >LPT1:      This sorts the lines in MAILLIST.TXT and
  20.                                  writes them to the printer. 
  21.  
  22.   DIR | SORT/+14                 Here we are sorting the output from the DIR
  23.                                  command starting on column 14 (which is the
  24. TUTOR    BAS   1022              file's size). In this example, the SORT is a
  25. PAL      TXT   9042              used in conjunction with another command.
  26. DBTUTOR  EXE  10661              Notice the use of |(piping) to send the
  27. MYFILE   DOC 101512              output of the DIR command into SORT. Use +9
  28.                                  to sort by extension, +23 to sort by date, 
  29.                                  and +33 to sort by time.
  30.  
  31.   SORT <FILE1.TXT >ALPFILE1.TXT  This reads the lines in FILE1.TXT and writes
  32.                                  the sorted lines to a file called
  33.                                  ALPFILE1.TXT.
  34. 
  35.  
  36.