summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-17 23:27:14 -0500
committerBjoern B. Brandenburg <bbb@cs.unc.edu>2011-02-17 23:27:14 -0500
commit465c42dd51644745a1238d2603b718c07aa251b2 (patch)
tree65adb0323094def711a41f58aee0aaa625dd3c93
parent4017bdc2b370c13763fbb40b80bbe775f6617ece (diff)
add helper to reoder feather-trace events in many log files
-rwxr-xr-xsort-all23
1 files changed, 23 insertions, 0 deletions
diff --git a/sort-all b/sort-all
new file mode 100755
index 0000000..7a0b63b
--- /dev/null
+++ b/sort-all
@@ -0,0 +1,23 @@
1#!/bin/bash
2
3SORT=ftsort
4
5function do_sort() {
6 printf "[$NUM/$TOTAL] Sorting $1\n"
7 $SORT $1
8}
9
10if [ ! -f "$1" ]; then
11 echo "Usage: sort-all <file.ft>+"
12 exit 1
13fi
14
15TOTAL=`echo $* | wc -w`
16
17NUM=0
18
19while [ "" != "$*" ]; do
20 NUM=$((NUM + 1))
21 do_sort $1
22 shift
23done