diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/bilingual_sort.awk | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/scripts/bilingual_sort.awk b/scripts/bilingual_sort.awk new file mode 100644 index 0000000..6f6f53a --- /dev/null +++ b/scripts/bilingual_sort.awk @@ -0,0 +1,12 @@ +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") + + return f == l ? -1 : +1 +} |