Skip to content

Instantly share code, notes, and snippets.

@dustinbutterworth
Created March 28, 2022 18:44
Show Gist options
  • Save dustinbutterworth/6fca677e74fd86e6b0f617a0be6561ed to your computer and use it in GitHub Desktop.
Save dustinbutterworth/6fca677e74fd86e6b0f617a0be6561ed to your computer and use it in GitHub Desktop.
Parse html
#!/usr/bin/env bash
xmlgetnext () {
local IFS='>'
read -d '<' TAG VALUE
}
cat $1 | while xmlgetnext ; do echo $TAG ; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment