Skip to content

Instantly share code, notes, and snippets.

@spencerwhyte
Created February 18, 2016 05:40
Show Gist options
  • Save spencerwhyte/f91e86bdf26ef6dae1a9 to your computer and use it in GitHub Desktop.
Save spencerwhyte/f91e86bdf26ef6dae1a9 to your computer and use it in GitHub Desktop.
You have some html options, and you want the contents of the tags.
cat data | sed 's/<option value=".*">//g' | sed 's/<\/option>//g' | sed 's/^ *//' | sed 's/\&amp;/\&/' | sed '/^$/d' | sed 's/$/",/' | sed 's/^/"/g' | tr '\n' ' '
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment