[PLUG] Sorting blocks of text

Rich Shepard rshepard at appl-ecosys.com
Wed Nov 23 00:45:05 UTC 2016


   I've a few files of names and addresses; each block is separated by two
blank lines. I'd like to sort them alphabetically by the first line. 'sort'
does not seem to do this as I don't see a record separator, only a field
separator.

   Is there an emacs function that will do this? My knowledge of awk
suggests that it's not the appropriate tool. There surely is some linux tool
do do this job, yes?

   I don't know perl, but could write a python script to do this.

Rich



More information about the PLUG mailing list