Skip to content

Instantly share code, notes, and snippets.

@zph
Created May 28, 2012 04:57
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 zph/2817305 to your computer and use it in GitHub Desktop.
Save zph/2817305 to your computer and use it in GitHub Desktop.
todo_count(){
if $(which todo &> /dev/null)
then
num=$(echo $(todo ls $1 | wc -l))
let todos=num-2
if [ $todos != 0 ]
then
echo "$todos"
else
echo ""
fi
else
echo ""
fi
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment