blob: 6b54449101edada3cb946cb3b6f51c2e85251cf3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
#!/bin/sh
trap ctrl_c INT
function ctrl_c() {
kill $(jobs -p)
echo "Killed."
}
cd output || exit 1
mkdir -p ../sorted
for a in *[05]; do echo "$a" >&2; ../merge_entries $a > ../sorted/$a; done &
for a in *[16]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done &
for a in *[27]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done &
for a in *[38]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done &
for a in *[49]; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done &
for a in brken *_; do echo " $a" >&2; ../merge_entries $a > ../sorted/$a; done &
wait
|