Awk and sort (of text files)

Michael Hennebry hennebry at web.cs.ndsu.nodak.edu
Mon Jun 29 17:20:54 UTC 2015


If I understand it correctly,
the hard part is converting a paragraph into a string and back again.
Here is a suggestion:
To each sequence of vertical strokes add one more.
Change each newline into a vertical stroke. 
Sort the strings.
Change them back into paragraphs.
Not sure how to do any of that with awk.
I'd use python.

-- 
Michael   hennebry at web.cs.ndsu.NoDak.edu
"SCSI is NOT magic. There are *fundamental technical
reasons* why it is necessary to sacrifice a young
goat to your SCSI chain now and then."   --   John Woods


More information about the users mailing list