projects
/
pubbin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fbd8adf
)
cleanup-timesamples: optional pre/post editing
author
Dan White
<dan@whiteaudio.com>
Sat, 7 Dec 2013 20:13:52 +0000
(14:13 -0600)
committer
Dan White
<dan@whiteaudio.com>
Sat, 7 Dec 2013 20:13:52 +0000
(14:13 -0600)
cleanup-timesamples
patch
|
blob
|
history
diff --git
a/cleanup-timesamples
b/cleanup-timesamples
index dd2763f850838f06454778361049e2a6fba3373d..7bf95c142d5ec17880ecbc07170da45314ec4776 100755
(executable)
--- 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