home *** CD-ROM | disk | FTP | other *** search
/ ftp.barnyard.co.uk / 2015.02.ftp.barnyard.co.uk.tar / ftp.barnyard.co.uk / cpm / walnut-creek-CDROM / CPM / PROGRAMS / SORT / SORTV.DOC < prev    next >
Text File  |  2000-06-30  |  2KB  |  42 lines

  1.         SORTV.DOC (vevised 1/14/81)
  2.        Brief commentary on the use of SORTV
  3.                    by Ward Christensen
  4.  
  5. SORTV is a "simple" sort program for variable length (CR/LF
  6. terminated) record files, i.e. the typical CP/M file of
  7. lists of things.  It defaults to sorting from the 1st char
  8. in the line, but can skip past any particular characters
  9. that occur in the file.  The file being sorted must fit
  10. in memory.  You may write back to the input file, or to
  11. another.  /// A typical use would be to sort a list of 
  12. filenames into filetype sequence, i.e. names.sub from FMAP.
  13. Some examples: If you want to sort "files.nam" into se-
  14. quence: SORTV FILES.NAM;  To sort a list of names (as pro-
  15. duced by FMAP *.* Q, for example) by filetype: 
  16. SORTV NAMES.SUB @.  The "@" means to sort "at", and the "."
  17. means at the period.  Note EACH line must have the skip-
  18. character specified.  To sort a file skipping a period,
  19. a comma, and 2 spaces: "SORTV NAME @.,  " where you put 2
  20. spaces after the ",".
  21.  
  22.  
  23. Here's the general way to execute SORTV -
  24.  
  25. To write back to file in place:   SORTV name
  26.  
  27. To write to another: SORTV inputname outputname
  28.  
  29. If you should want to use a tab as a skip character, you
  30. must either specify an output filename, or use a single
  31. "." for the output name (causes input to be overlaid with
  32. output)  This is because CP/M doesn't like having a con-
  33. trol character in a place it considers to be a filename
  34. (one of its two it may take on a command).  Thus to skip
  35. a tab, a period, and another tab, writing "FILE" back to
  36. itself:  SORTV FILE . @^I.^I  where "^I" means you pressed
  37. the "tab" key.  If you typed: SORTV FILE @^I.^I CP/M would
  38. reject the command because it thinks you are putting a
  39. tab into the second (output) filename.  P.S. bug: file must
  40. end with cr/lf.  Enjoy.
  41.                Ward Christensen  01/14/81
  42.