From 330f2f6f4b3b63d99f332ba04feaae0e30860af3 Mon Sep 17 00:00:00 2001 From: Dan White Date: Mon, 18 Jan 2021 10:22:07 -0600 Subject: [PATCH] always sort samples --- cleanup-timesamples | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cleanup-timesamples b/cleanup-timesamples index ba8852d..4d7e39a 100755 --- a/cleanup-timesamples +++ b/cleanup-timesamples @@ -16,7 +16,7 @@ if true || [ "$1" = "-s" ]; then sleep 0.05 sort -u $SAMPLES > $TMPFILE cp $TMPFILE $SAMPLES - shift + #shift fi @@ -26,8 +26,8 @@ vim $SAMPLES if [ "$1" = "-c" ]; then echo "Cleaning and sorting timeSamples from this host ($HOSTNAME)." - grep -v "null$" "$HOME/.timeSampler.$HOSTNAME" | sort -u > $f.tmp - cp $f.tmp $f + grep -v "null$" "$SAMPLES" | sort -u > $TMPFILE + cp $TMPFILE $SAMPLES fi -- 2.25.1