Skip to content

Instantly share code, notes, and snippets.

@miike
Created December 2, 2015 04:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save miike/4f342db2b88c4a029c53 to your computer and use it in GitHub Desktop.
Save miike/4f342db2b88c4a029c53 to your computer and use it in GitHub Desktop.
Sed expression to extract row values out of Wikipedia iwlink dumps
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