Created
January 31, 2015 05:23
-
-
Save xuchunyang/b293bd5f6c4465b9dd3c to your computer and use it in GitHub Desktop.
Convert txt to csv (try to solve https://www.v2ex.com/t/166942)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
➜ ~ cat words.txt | |
a[ei, ә]art.一个 | |
an[әn, æn]art.一个 | |
ability[ә'biliti]n.能力,才干 | |
able['eibl]a.有才能的,能够的 | |
➜ ~ gawk 'match($0, /(.*)\[(.*)\](.*)/, m) { print m[1], "\t", m[2], "\t", m[3] }' words.txt | |
a ei, ә art.一个 | |
an әn, æn art.一个 | |
ability ә'biliti n.能力,才干 | |
able 'eibl a.有才能的,能够的 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment