Created
December 2, 2015 04:26
-
-
Save miike/4f342db2b88c4a029c53 to your computer and use it in GitHub Desktop.
Sed expression to extract row values out of Wikipedia iwlink dumps
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
sed -re 's#\\\"#"#g' -e 's#"#""#g' -e "s#\\(([0-9]+)\s*,\s*'((\\\'|[^'])*)'\s*,\s*'((\\\'|[^'])*)'\)\s*[,;]?\s*#\1,\"\2\",\"\4\"\n#g" -e "s#\\\'#'#g" enwiki-latest-iwlinks.sql |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment