Skip to content

Instantly share code, notes, and snippets.

@pcambra
Last active March 24, 2016 15:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save pcambra/f343bd5baca40f14af32 to your computer and use it in GitHub Desktop.
Save pcambra/f343bd5baca40f14af32 to your computer and use it in GitHub Desktop.
#!/bin/sh
NOW=$(date +"%F")
LOGFILE="followers-$NOW.log"
t followers -s > /tmp/unfollows.log
cat /tmp/unfollows.log | wc -l > $LOGFILE
cat /tmp/unfollows.log >> $LOGFILE
# Print results for the last update.
echo "Diff since last time";
diff $(ls -rt followers-*|tail -2)
@e0ipso
Copy link

e0ipso commented Mar 16, 2016

Added temp file.

#!/bin/sh

NOW=$(date +"%F")
LOGFILE="followers-$NOW.log"
t followers -s > /tmp/unfollows.log
cat /tmp/unfollows.log | wc -l > $LOGFILE
cat /tmp/unfollows.log >> $LOGFILE

# Print results for the last update.
echo "Diff since last time";
diff $(ls -rt followers-*|tail -2)

@pcambra
Copy link
Author

pcambra commented Mar 24, 2016

Thanks, updating the script!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment