Skip to content

Instantly share code, notes, and snippets.

Created January 7, 2015 20:15
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
What would you like to do?
This script will cleanup your following list on Twitter. needs to be installed.
#!/usr/bin/env bash
set -o nounset
set -o errexit
KEEPFILE=`mktemp /tmp/$(basename $0).XXXXXX`
# create list with people who should not be removed in any case:
t list members $KEEPLIST | sed 's/ /\n/g' | sort -f > $KEEPFILE
# unfollow everyone who is not following back
# every user in $KEEPLIST is filtered from the list
t leaders | sed 's/ /\n/g' | grep -v -f $KEEPFILE | xargs -I {} t unfollow "@{}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment