Skip to content

Instantly share code, notes, and snippets.

@johndrinkwater
Created December 20, 2018 10:33
Show Gist options
  • Save johndrinkwater/f7385cd5b47048b6e5c075faf95ac8e0 to your computer and use it in GitHub Desktop.
Save johndrinkwater/f7385cd5b47048b6e5c075faf95ac8e0 to your computer and use it in GitHub Desktop.
Testing wget version to avoid: wget: unrecognised option '--hsts-file=…
wgetver="$(\wget -V | head -1 | cut -d' ' -f 3)"
wgetwant="1.17.0"
if [ "$(printf '%s\n' "$wgetwant" "$wgetver" | sort -V | head -n1)" = "$wgetwant" ]; then
alias wget="wget --hsts-file=~/settings/config/wget/wget-hsts"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment