home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / programm / 3879 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.2 KB

  1. Path: sparky!uunet!haven.umd.edu!darwin.sura.net!Sirius.dfn.de!chx400!sicsun!disuns2!lsesun3!ebel
  2. From: ebel@lsesun3.epfl.ch (Norbert EBEL)
  3. Newsgroups: comp.unix.programmer
  4. Subject: Sorting articles of variable number of lines
  5. Keywords: Sorting text Files
  6. Message-ID: <4348@disuns2.epfl.ch>
  7. Date: 23 Jul 92 15:29:28 GMT
  8. Sender: news@disuns2.epfl.ch
  9. Organization: Laboratoire de Systemes d'Exploitation - E P F Lausanne, Switzerland
  10. Lines: 21
  11. Nntp-Posting-Host: lsesun5.epfl.ch
  12.  
  13. Hi Netters,
  14.  
  15. If I want to sort text files containing articles of variable length
  16. according to a fixed criteria I thought of the following solution:
  17.  
  18. 1) make a very long line with an article putting a special sequence in 
  19.    order to remember the end of line, using tr, awk or sed
  20. 2) sorting according the given criteria using sort
  21. 3) rechanging the special sequence to nl
  22. A problem is most utilities allows for limmited length of line
  23.  
  24. Is there any better solution or possibly a utility for that.
  25.  
  26. I found this problem when I saved mails in the wrong incoming order
  27. in a folder. For that special pourpose there is special option on Sun in 
  28. the mail utility but I can imagine other situations where a similar 
  29. problem will occur.
  30.  
  31. Please answer by e-mail. Thanks
  32.  
  33. Norbert Ebel
  34.