commit 4000815e49d69fcc4888b51cb2371e330a5d578d parent f40915f7a51a2b8d71133a598d088cef13dee5d8 Author: Anders Damsgaard <andersd@riseup.net> Date: Fri, 8 Dec 2017 10:22:08 -0500 Improve output appearance 🌈 Diffstat:
M | links/bin/t-followers-diff.sh | | | 9 | +++++++-- |
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/links/bin/t-followers-diff.sh b/links/bin/t-followers-diff.sh @@ -5,11 +5,16 @@ tmpfile=~/tmp/t-followers.txt mv $tmpfile{,-old} +RED='\033[0;31m' +GREEN='\033[0;32m' +NC='\033[0m' + #t followers -l | awk '{ print $13 }' > $tmpfile t followers | \ sed 's/ */ /' | sed 's/ *//g' \ > $tmpfile -echo "< unfollowed > new follower" +#echo -e "${RED}< unfollowed ${GREEN}> new follower${NC}" colordiff $tmpfile{-old,} | sed 's/ / https:\/\/twitter.com\//' -echo "To $(wc -l $tmpfile | awk '{ print $1 }') from $(wc -l $tmpfile-old | awk '{ print $1 }') followers" +echo -e -n "From ${RED}$(wc -l $tmpfile-old | awk '{ print $1 }')${NC} " +echo -e "to ${GREEN}$(wc -l $tmpfile | awk '{ print $1 }')${NC} followers"