Skip to content

Instantly share code, notes, and snippets.

@HeLiBloks
Last active April 15, 2016 14:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HeLiBloks/617ac64a5d67f30c758b4b801eb9a7ea to your computer and use it in GitHub Desktop.
Save HeLiBloks/617ac64a5d67f30c758b4b801eb9a7ea to your computer and use it in GitHub Desktop.
curl scripts
#!/bin/sh
#show size of remote file, should fetch only header
curl 'http://www.ruhbarbdownloads.remote'\
--silent -H 'Accept-Encoding: gzip,deflate'\
--write-out 'size_download=%{size_download}\n'\
--output /dev/null
#show header
curl -sI 'http://www.ruhbarbdownloads.remote' #| awk '/Content-Length/ { print $2 }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment