Skip to content

Instantly share code, notes, and snippets.

@Calmarius
Created January 4, 2022 08:17
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 Calmarius/40af851a8c8d77148fa5beb41747526f to your computer and use it in GitHub Desktop.
Save Calmarius/40af851a8c8d77148fa5beb41747526f to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ $# -lt 1 ]
then
echo "Usage $0 <directory>"
exit
fi
DIR=$1
VERY_GOODS=`grep ^++ -rn "$DIR" | wc -l`
GOODS=`grep ^+ -rn "$DIR" | wc -l`
BADS=`grep ^- -rn "$DIR" | wc -l`
VERY_BADS=`grep ^-- -rn "$DIR" | wc -l`
echo "Very good: $VERY_GOODS"
echo "Good: $GOODS"
echo "Bad: $BADS"
echo "Very bad: $VERY_BADS"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment