Discussion:
[9fans] trans
(too old to reply)
arisawa
2013-06-13 10:30:55 UTC
Permalink
I forgot to add:

http://plan9.aichi-u.ac.jp/netlib/cmd/trans/
Hello,
I have released a tool that extends tr command to handle strings.
the command syntax is: trans rule [file ...]
where "rule" is a rule file.
alice bob
bob alice
will swap "alice" and "bob" in text.
alice bob
bob carol
carol alice
will rotate "alice", "bob" and "carol" in text.
Trans originary designed for unicode conversion NFD to NFC.
# unicode
# Latin letters
0061:0308 00E4 ä
0065:0308 00EB ë
0069:0308 00EF ï
006F:0308 00F6 ö
0075:0308 00FC ü
0079:0308 00FF ÿ
The code in trans will be applied to u9fs for Mac.
Kenji Arisawa
erik quanstrom
2013-06-14 15:35:14 UTC
Permalink
Trans originary designed for unicode conversion NFD to NFC.
# unicode
# Latin letters
0061:0308 00E4 ä
0065:0308 00EB ë
0069:0308 00EF ï
006F:0308 00F6 ö
0075:0308 00FC ü
0079:0308 00FF ÿ
The code in trans will be applied to u9fs for Mac.
i think that compose and decompose
(rune(1), http://9atom.org/magic/man2html/1/rune)
might also do the job. they rely on runecompose
and runedecompose (runeclass(2),
http://9atom.org/magic/man2html/2/runeclass)

this might be kinder to the old warhorse tr(1). :-)

- erik

Continue reading on narkive:
Loading...