Skip to content

Instantly share code, notes, and snippets.

@HelioCampos
Last active January 13, 2016 16:33
Show Gist options
  • Save HelioCampos/b94415d89be08b640a62 to your computer and use it in GitHub Desktop.
Save HelioCampos/b94415d89be08b640a62 to your computer and use it in GitHub Desktop.
Extract table from HTML file
#!/bin/bash
cat $1 | sed -r -e 's/<\/tr>/<\/tr>\n/g' -e 's/<table /\n<table/g' -e 's/<\/table>/\n<\/table>/g' -e 's/[<][^>]+[>]/ /g' -e 's/&nbsp;//g'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment