Last active
August 25, 2022 23:44
-
-
Save rothgar/d8e7681d1509ae48b4b148f84e988d06 to your computer and use it in GitHub Desktop.
curl-to-bash
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
# use pup for HTML parsing | |
# https://github.com/ericchiang/pup | |
# | |
# remove lines that start with < (html formatted) | |
# or # comments | |
curl-to-bash() { | |
curl -s "${1}" \ | |
| pup -p code \ | |
| grep -v -E '^[[:space:]]*#|^[[:space:]]*<' | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment