Debian Codegraph @

bin/dic2txt

raw symbols SCIP
1 #!/bin/sh
2 # OpenOffice.org custom.dic converter
3 # Authors: Khiraly <[email protected]> and others
4
5 case $# in
6 0) echo "OpenOffice.org custom.dic->wordlist converter
7 Usage: dic2txt custom.dic >words.txt"; exit 0;;
8 esac
9
10 if [ "`type -p iconv`" != "" ]; then
11 filter="iconv -f utf-8 -t latin2"
12 else
13 filter="recode utf8..latin"
14 fi
15
16 cat "$1" | $filter | tr -d '\001-\011\013-\037\056' | \
17 tr '\000' '\n' | grep -v ^$ | sort -u