How to Sort a List Database for Mac
Most database software has the capability to sort its records, but in some cases sort order is not permanently stored and you may wish to do this. Alternately, you may be presented with a database in software you do not know how to use. You can use built-in Mac tools to work with your database as a text file, then move it to more familiar software.
Instructions
-
-
1
Convert your database into plain text. This feature is included in nearly all database software and is most commonly found under the "File" menu. Look for an entry for "Export" or "Save As," then choose any of the following from this save dialog: text, tab-separated text or comma-separated text. There may be other windows that appear before you see the save dialog. Follow those steps until you are allowed to save the database as text.
-
2
Open the Terminal application in your /Applications/Utilities folder.
-
-
3
Type the word "sort" followed by a space in the Terminal window. Do not hit return.
-
4
Drag the file you saved in step one to the Terminal window, then click on the window again. You will see the name of the file appear after the word "sort." Again, do not hit return.
-
5
Type a space, the ">" character, another space, then exactly this:
~/Documents/sorted-db.txt
Press the return key to begin the sort. The sort command will open the exported file you created in step one, sort every line in alphabetical order, and save it to a file named "sorted-db.txt" in your Documents folder.
-
6
Open the sorted-db.txt file if you wish to review it, or import it into the database or spreadsheet software of your choice.
-
1