Created
October 16, 2019 07:57
-
-
Save tongpu/0be1ee2a57b0ae7c1cf38df56e6b9c72 to your computer and use it in GitHub Desktop.
A simple shell function to replace /blob/ with /raw/ in a GitHub URL to download the raw file
This file contains hidden or 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
function github-raw() { | |
# replace /blob/ in the GitHub URL with /raw/ | |
curl --silent --location --remote-name ${1:s#/blob/#/raw/#} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment