Skip to content

Instantly share code, notes, and snippets.

@Coornail
Created February 20, 2013 16:43
Show Gist options
  • Save Coornail/4996947 to your computer and use it in GitHub Desktop.
Save Coornail/4996947 to your computer and use it in GitHub Desktop.
Todo.txt progress bar
#!/bin/bash
ALL_TASKS=`cat ~/todo.txt | wc -l`
COMPLETED_TASKS=`cat ~/todo.txt | grep '^x\ ' | wc -l`
echo -n '['
for i in $(seq 1 $COMPLETED_TASKS); do
echo -n '='
done;
for i in $(seq 1 $ALL_TASKS); do
echo -n ' '
done;
echo ']'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment