changeset 57:c017b362673d misc

Updated.
author Matti Hamalainen <ccr@tnsp.org>
date Tue, 24 Nov 2009 11:21:22 +0000
parents 880d101044b0
children 564aa8980bf6
files taskinfo/findundone.sh
diffstat 1 files changed, 2 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/taskinfo/findundone.sh	Tue Sep 22 17:25:37 2009 +0000
+++ b/taskinfo/findundone.sh	Tue Nov 24 11:21:22 2009 +0000
@@ -3,13 +3,11 @@
 LOGFILE="$HOME/tiny.log"
 
 echo "Searching logfile '$LOGFILE' for finished tasks ... "
-tail -500 "$LOGFILE" | perl -ne 'if(/^  \| ([A-Z][^|]+)\| \[ \:. \]/){$s=$1;$s =~ s/ *$//;print "$s\n"}'|sort|uniq > "$TMPFILE"
-
-echo "Found `cat $TMPFILE|wc -l` tasks."
+tail -500 "$LOGFILE" | perl -e 'my @tmp; while (<STDIN>) { if(/^  \| ([A-Z][^|]+)\| \[ \:. \]/) { $s = $1; $s =~ s/ *$//; push(@tmp,$s); }} print "$_\n" foreach (sort { $a cmp $b} @tmp); print STDERR "Found ".(scalar @tmp)." tasks.\n";' > "$TMPFILE"
 
 echo "Checking for missing (unopened) tasks ..."
 perl -w findreqs.pl -tasks < taskdata.txt | while read i; do
-	if ! grep "$i" "$TMPFILE" > /dev/null; then
+	if ! grep "^$i" "$TMPFILE" > /dev/null; then
 		echo "* $i"
 	fi
 done