From 11ff6825b70668df246788c9573fd90a0c2ae344 Mon Sep 17 00:00:00 2001 From: Dan White Date: Thu, 11 Jun 2015 12:09:26 -0500 Subject: [PATCH] cleanup-timesamples: only purge null / sort this host's entries --- cleanup-timesamples | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) 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 -- 2.25.1