From: Dan White Date: Thu, 11 Jun 2015 17:09:26 +0000 (-0500) Subject: cleanup-timesamples: only purge null / sort this host's entries X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=11ff6825b70668df246788c9573fd90a0c2ae344;p=pubbin.git cleanup-timesamples: only purge null / sort this host's entries --- diff --git a/cleanup-timesamples b/cleanup-timesamples index cf85c96..364efca 100755 --- a/cleanup-timesamples +++ b/cleanup-timesamples @@ -24,11 +24,10 @@ vim $SAMPLES if [ "$1" = "-c" ]; then - echo "Cleaning and sorting all timeSamples." - for f in $(ls -1 $HOME/.timeSampler.*); do - grep -v "null$" $f | sort -u > $f.tmp - cp $f.tmp $f - done + echo "Cleaning and sorting timeSamples from this host ($HOSTNAME)." + + grep -v "null$" "$HOME/.timeSampler.$HOSTNAME" | sort -u > $f.tmp + cp $f.tmp $f fi