Dev Tip: Sort content in clipboard on MacOs & Linux

Run this in your terminal to sort the text in your clipboard

pbpaste | sort | pbcopy

Use `sort -n` to sort lines beginning with numbers.

pbpaste | sort -n | pbcopy

Code Break Down:
`pbpaste` paste the clipboard content into the standard input.
`sort` sorts the standard input.
`pbcopy` copies what comes from the standard output.

Run `man sort` to fine out more about the sorting options.

In Linux, you can add support for `pbpaste` and `pbcopy` by adding aliases commands to `xclip` in your ~/.bash_rc.
More information here

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

More Posts - Website

Follow Me:
TwitterLinkedInYouTube

Custom URL for your Github Page

> Legit. I bought https://larrybattle.me from NameCheap.com and configured it to be hosted on Github.com. Setup took less than 20 minutes. Github even gave me free HTTPS support. Now when users go to my old github url, http://larrybattle.github.io, it takes them to my new url https://www.larrybattle.me/

Larry Battle

I love to program, and discover new tech. Check out my stackoverflow and github accounts.

More Posts - Website

Follow Me:
TwitterLinkedInYouTube