Skip to content

Instantly share code, notes, and snippets.

@adamvr
Created May 16, 2012 08:25
Show Gist options
  • Select an option

  • Save adamvr/2708685 to your computer and use it in GitHub Desktop.

Select an option

Save adamvr/2708685 to your computer and use it in GitHub Desktop.
#!/bin/sh
style='ls {}/style.txt >/dev/null 2>&1 || echo {}'
errors='ls {}/*.errors.c >/dev/null 2>&1 || echo {}'
number=`find . -maxdepth 1 -mindepth 1 | sort | wc -l`
finished=`find . -maxdepth 1 -mindepth 1 -exec sh -c "$style" \; | sort | wc -l`
started=`find . -maxdepth 1 -mindepth 1 -exec sh -c "$errors" \; | sort | wc -l`
echo Total: $number
echo Finished: $finished
echo Remaining: $(( $number - $finished ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment