A few little scripts for sorting Twitter URLs and similar things.
Original source: https://twitter.com/_devalias/status/1788459969857351705
Given a list of Twitter URLs like:
https://twitter.com/userA/status/123453
https://twitter.com/userB/status/123465
https://twitter.com/userA/status/123450
We can sort them by tweetID like this:
⇒ pbpaste | sort -t '/' -k 6n
https://twitter.com/userA/status/123450
https://twitter.com/userA/status/123453
https://twitter.com/userB/status/123465
Or sort/batch them by userID, and then tweetID like this:
⇒ pbpaste | sort -t '/' -k 4,4 -k 6n | awk -F'/' '{if (last && $4 != last) print ""; last=$4; print $0}'
https://twitter.com/userA/status/123450
https://twitter.com/userA/status/123453
https://twitter.com/userB/status/123465
This can then assist in reviewing/working through a backlog of tweets while reducing the impact of 'cognitive context switching'.