summaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorThomas Voss <mail@thomasvoss.com> 2023-06-25 18:54:22 +0200
committerThomas Voss <mail@thomasvoss.com> 2023-06-25 18:54:22 +0200
commita4ce08bde0bcef664706b78146077ad7053a468b (patch)
tree6671037e22591b98def5e99a7e2fbf3a5a0c7ff0 /scripts
parent529114f2c769c359f2c0353631a183670d3dbebe (diff)
Make sorting stuff much faster
Diffstat (limited to 'scripts')
-rw-r--r--scripts/bilingual_sort.awk6
1 files changed, 2 insertions, 4 deletions
diff --git a/scripts/bilingual_sort.awk b/scripts/bilingual_sort.awk
index 6f6f53a..7e50136 100644
--- a/scripts/bilingual_sort.awk
+++ b/scripts/bilingual_sort.awk
@@ -3,10 +3,8 @@ function bilingual_sort(i1, v1, i2, v2, l, r, f)
l = cc2name[v1[0]]
r = cc2name[v2[0]]
- printf "%s\n%s\n", l, r |& "sort"
- close("sort", "to")
- "sort" |& getline f
- close("sort", "from")
+ print l ":" r |& CMD
+ CMD |& getline f
return f == l ? -1 : +1
}