advertisement
Forums

The Forum is sponsored by 
 

AAPL stock: Click Here

You are currently viewing the Tips and Deals forum
Looking for an app (script?) to alphabetize a list
Posted by: DeusxMac
Date: January 25, 2019 01:01PM
Haven't needed this ability for a looong time, but I'm sure I used to have something that could alphabetize a selected list of words/sentences, but I'm not seeing this capability in anything I've now got installed.

Not in TextEdit. Not in Notes. Not in Pages. Not in TextWrangler.
Search of the Apple App Store doesn't zero in on anything, nor does MacUpdate.

Am I just overlooking this capability somewhere, or is it now only in high end word processing apps?

TIA
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: kurtzie
Date: January 25, 2019 02:04PM
Paste into a spreadsheets and sort?
Numbers, Libre Office, Excel?



Edited 1 time(s). Last edit at 01/25/2019 02:04PM by kurtzie.
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: Buzz
Date: January 25, 2019 02:22PM
Go into Word (or other word processing program w/ adequate functionality), do a Find & Replace for the space character " " with a carriage return... in Word it's "^p". That gives you a giant list of your words. Use the Sort function (in Word it's under the "Table" menu) to sort by 'Text' in ascending order, and you have an alphabetized list.
==
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: dfilpus
Date: January 25, 2019 02:49PM
BBEdit can sort text lines.
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: NewtonMP2100
Date: January 25, 2019 03:15PM
.....fave app is potato skins....filled with........



_____________________________________

I reject your reality and substitute my own!
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: TheTominator
Date: January 25, 2019 03:42PM
Quote
DeusxMac
Not in TextWrangler.

My version of TextWrangler has it. (version 5.5.2)

Select text.
Select from the menu Text->Sort Lines...


Of course, Terminal can do it.

$ sort unsorted.txt > sorted.txt
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: Bernie
Date: January 25, 2019 03:51PM
Try this. Works within the app you are presently using in most cases. Old school Mac software.

TextSoap 8

TextSoap 8 Overview

Automatically remove unwanted characters, fix messed up carriage returns, and pretty much anything else you can imagine. Save time & effort. Be more productive.

Stop manually fixing text documents and emails. TextSoap can automate away all that tediousness. Download the trial now.

Requires macOS (OS X) 10.10 or later

Clean Interface
Integrated Text Editor
100+ Built-in Cleaners
Powerful Regular Expression Support
Custom Cleaners for customized solutions
Custom Grouping for personal organization
TextSoap Menu integrates into your favorite app
AppleScript support
Moreā€¦
Cleaning Your Text For 19 Years!




Staunton, Virginia
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: gabester
Date: January 25, 2019 06:13PM
Quote
TheTominator
Of course, Terminal can do it.
$ sort unsorted.txt > sorted.txt

This is the way to do it with least effort. You can drag your input file to the Terminal.app window after typing sort then type > then drag the folder you want the output file to go into to the Terminal.app window and be sure to append a filename there e.g. /sorted.txt with no spaces...

Something that looks like this:

$ sort /Users/username/Desktop/source.txt > /Users/username/Desktop/sorted.txt

Oh, and it's available on any Mac, no extra apps needed. At the Apple Store? You can run this. Bonus points for eliminating duplicates by piping through the uniq command!



Edited 1 time(s). Last edit at 01/25/2019 06:15PM by gabester.
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: TheTominator
Date: January 25, 2019 07:14PM
If you already have the text inside a program such as a word processor and don't want to save it to a separate plain text file...

Highlight the text.
Copy.
At the Terminal command prompt type "pbpaste | sort | pbcopy" and hit return.
Go back to your word processor and Paste.

The selection will be replaced with the text sorted.
By default it will be sorted alphabetically in ascending order.
To sort in descending order use "pbpaste | sort -r | pbcopy"
To sort in ascending numerical order use "pbpaste | sort -n | pbcopy"
To sort in descending numerical order use "pbpaste | sort -nr | pbcopy"
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: TheTominator
Date: January 25, 2019 07:16PM
Quote
Bernie
[bOld school Mac software.[/b]

TextSoap 8

Requires macOS (OS X) 10.10 or later

macOS 10.10 seems pretty new school to me.
I run 10.6.8 on my primary productivity machine.
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: Bernie
Date: January 25, 2019 07:40PM
Older TextSoap 5, 6, and 7




Staunton, Virginia



Edited 1 time(s). Last edit at 01/25/2019 07:41PM by Bernie.
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: DeusxMac
Date: January 25, 2019 07:56PM
Thanks all.

At TheTominator's suggestion, I went back into TextWrangler, and indeed it could alphabetize my list, but with a completely cryptic check box labeled only "Sorted lines replace selection".
Options:  Reply • Quote
Re: Looking for an app (script?) to alphabetize a list
Posted by: gabester
Date: January 26, 2019 02:01PM
Quote
TheTominator
If you already have the text inside a program such as a word processor and don't want to save it to a separate plain text file...

Highlight the text.
Copy.
At the Terminal command prompt type "pbpaste | sort | pbcopy" and hit return.
Go back to your word processor and Paste.

The selection will be replaced with the text sorted.
By default it will be sorted alphabetically in ascending order.
To sort in descending order use "pbpaste | sort -r | pbcopy"
To sort in ascending numerical order use "pbpaste | sort -n | pbcopy"
To sort in descending numerical order use "pbpaste | sort -nr | pbcopy"

++ THIS IS THE BEST SUGGESTION YET. ++

Assuming each item to be sorted is on its own separate line, this works with EVERY text source in any application (mind you have to use a second app - Terminal.app) TheTominator gets my Genius Award for the thread.
Options:  Reply • Quote
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 100
Record Number of Users: 186 on February 20, 2020
Record Number of Guests: 5122 on October 03, 2020