summaryrefslogtreecommitdiff
path: root/parasort.sh
diff options
context:
space:
mode:
Diffstat (limited to 'parasort.sh')
-rw-r--r--parasort.sh17
1 files changed, 11 insertions, 6 deletions
diff --git a/parasort.sh b/parasort.sh
index 6565d61..b593bb9 100644
--- a/parasort.sh
+++ b/parasort.sh
@@ -18,11 +18,16 @@ export PATH=${PATH}:`pwd -P`/bin/
18mkdir -p work/sorted 18mkdir -p work/sorted
19cd work/output || exit 1 19cd work/output || exit 1
20 20
21for a in *[05]; do echo "$a" >&2; merge_entries $a > ../sorted/$a; done & 21starttime=`date +%s`
22for a in *[16]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done & 22
23for a in *[27]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done & 23for a in ???[05]?; do echo "$a" >&2; merge_entries $a > ../sorted/$a; done &
24for a in *[38]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done & 24for a in ???[16]?; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
25for a in *[49]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done & 25for a in ???[27]?; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
26for a in brken *_; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done & 26for a in ???[38]?; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
27for a in ???[49]?; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
28for a in brken ???_?; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
27 29
28wait 30wait
31
32elapsed=$(( `date +%s` - starttime ))
33printf "Finished in %d seconds (%d minutes)\n" ${elapsed} $(( elapsed / 60 ))