From af5a377b5017314e0cea76866e326f409f726893 Mon Sep 17 00:00:00 2001 From: Neale Pickett Date: Wed, 6 Jun 2012 22:13:49 -0600 Subject: [PATCH] simplify duplicate line check in pointsd --- packages/mcp/service/pointsd/pointsd | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/mcp/service/pointsd/pointsd b/packages/mcp/service/pointsd/pointsd index c9c9ba0..9d64efa 100755 --- a/packages/mcp/service/pointsd/pointsd +++ b/packages/mcp/service/pointsd/pointsd @@ -11,7 +11,7 @@ BACKUP=$WWW/backup.png SCOREBOARD=$WWW/scoreboard.html # Only do this if this score hasn't yet been recorded -if ! cut -d' ' -f2- $POINTS | grep -Fqx "$(cut -d' ' -f2- $fn)"; then +if [ -z "$(sort -k2 $POINTS $fn | uniq -f1 -d)" ]; then cat $fn >> $POINTS rm $fn fi