File: skktocdbm.sh

package info (click to toggle)
dbskkd-cdb 1%3A3.00-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 168 kB
  • sloc: ansic: 108; makefile: 49; sh: 39
file content (15 lines) | stat: -rwxr-xr-x 377 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
#!/bin/sh
# Converting SKK Dictionary to cdbmake-acceptable form
# Originally by D. J. Bernstein's 12tocdbm.sh
# modified by Kenji Rikitake
# bugfix of truncated strings by Hideto Kihara
# bugfix of locale by Tatsuya Kinoshita
LC_ALL=C awk '
  /^[^;]/ {
    s = substr($0, index($0, " ") + 1)
    print "+" length($1) "," length(s) ":" $1 "->" s
  }
  END {
    print ""
  }
'