summaryrefslogtreecommitdiff
path: root/parasort.sh
diff options
context:
space:
mode:
Diffstat (limited to 'parasort.sh')
-rw-r--r--parasort.sh24
1 files changed, 16 insertions, 8 deletions
diff --git a/parasort.sh b/parasort.sh
index 6b54449..6565d61 100644
--- a/parasort.sh
+++ b/parasort.sh
@@ -7,14 +7,22 @@ function ctrl_c() {
7 echo "Killed." 7 echo "Killed."
8} 8}
9 9
10cd output || exit 1 10if ! test -d work; then
11mkdir -p ../sorted 11 printf "This directory contains no work/ directory.\n"
12 [ -d ../work ] && printf "(but .. does)\n"
13 exit 1
14fi
12 15
13for a in *[05]; do echo "$a" >&2; ../merge_entries $a > ../sorted/$a; done & 16export PATH=${PATH}:`pwd -P`/bin/
14for a in *[16]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done & 17
15for a in *[27]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done & 18mkdir -p work/sorted
16for a in *[38]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done & 19cd work/output || exit 1
17for a in *[49]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done & 20
18for a in brken *_; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done & 21for a in *[05]; do echo "$a" >&2; merge_entries $a > ../sorted/$a; done &
22for a in *[16]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
23for a in *[27]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
24for a in *[38]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
25for a in *[49]; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
26for a in brken *_; do echo " $a" >&2; merge_entries $a > ../sorted/$a; done &
19 27
20wait 28wait