From: Dan White Date: Sat, 7 Dec 2013 20:13:52 +0000 (-0600) Subject: cleanup-timesamples: optional pre/post editing X-Git-Url: http://git.whiteaudio.com/gitweb/?a=commitdiff_plain;h=d3af22ba6dc907e5b4038e47deb21d82e59be466;p=pubbin.git cleanup-timesamples: optional pre/post editing --- diff --git a/cleanup-timesamples b/cleanup-timesamples index dd2763f..7bf95c1 100755 --- a/cleanup-timesamples +++ b/cleanup-timesamples @@ -3,6 +3,13 @@ # cleanup data from timeSampler, # removes null entries and sorts by time +# -e edits before cleanup +# -E edits after cleanup +if [ "$1" = "-e" ]; then + vim $HOME/.timeSampler.$HOSTNAME + shift +fi + TMPFILE=$(tempfile) for f in $(ls -1 $HOME/.timeSampler.*); do grep -v "null$" $f | sort > $TMPFILE @@ -10,3 +17,7 @@ for f in $(ls -1 $HOME/.timeSampler.*); do done rm -f $TMPFILE + +if [ "$1" = "-E" ]; then + vim $HOME/.timeSampler.$HOSTNAME +fi