A Quick Way To Sort Text on macOS

One way to quickly sort text on macOS that I’m currently using is this:

I copy the text (Mark text & CMD-C) and them do this in iTerm:

pbpaste | sort | pbcopy

And that’s it, already. The text is sorted and copied back to the clip board.

Update: this small change fits my actual needs even better: Sort the input case-insensitive:

pbpaste | sort -f | pbcopy

And as an Alfred App user I can even do this (and don’t have to open a terminal):

2 Replies to “A Quick Way To Sort Text on macOS”

  1. I sorted it for you 🙂

    And that’s it, already. The text is sorted and copied back to the clip board.
    I copy the text (Mark text & CMD-C) and them do this in iTerm:
    One way to quickly sort text on macOS that I’m currently using is this:
    pbpaste | sort | pbcopy

  2. This might run the risk of attempting to end up in an endless loop:
    I sorted this for you 🙂
    Ah well…
    Let’s see how this goes. 🙂
    Other than that: I see you got it. — Thanks for the comment!

    And that’s it, already. The text is sorted and copied back to the clip board.
    I copy the text (Mark text & CMD-C) and them do this in iTerm:
    I sorted it for you 🙂
    One way to quickly sort text on macOS that I’m currently using is this:
    pbpaste | sort | pbcopy

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Navigation

%d bloggers like this: