The sort-numeric-fields function is what you desire.
The function explicitly indicates it requires whitespace.
I tested your set and if I removed the leading '(' and highlighted the data
set, the sort-numeric-fields command works.To achieve your desired result: query-replace-regexp ^( <blank space> mark-whole-buffer sort-numeric-fields mark-whole-buffer delete-duplicate-lines The last command will print the number of duplicates deleted in the message window. On Tue, Oct 27, 2020 at 1:41 PM Rich Shepard <[email protected]> wrote: > On Tue, 27 Oct 2020, Bill Morita wrote: > > > Rather than killing yourself trying to get this done in Emacs, try > > creating a shell script that does the job. You can use <esc>| after > > selecting the region of your buffer to execute the shell script on. > > Bill, > > I tried this by using 'sort' but it didn't take -k 1; perhaps because there > is a leading ( or because the field separators are commas? > > Thanks, > > Rich > > _______________________________________________ > PLUG: https://pdxlinux.org > PLUG mailing list > [email protected] > http://lists.pdxlinux.org/mailman/listinfo/plug > _______________________________________________ PLUG: https://pdxlinux.org PLUG mailing list [email protected] http://lists.pdxlinux.org/mailman/listinfo/plug
