Skip to content

Instantly share code, notes, and snippets.

@chazcheadle
Created March 24, 2015 19:47
Show Gist options
  • Select an option

  • Save chazcheadle/4d1aaaaa9398b070ea48 to your computer and use it in GitHub Desktop.

Select an option

Save chazcheadle/4d1aaaaa9398b070ea48 to your computer and use it in GitHub Desktop.
Curl content cache busting with timestamp parameter
#!/bin/bash
if [[ $1 == *"?"* ]]
then
q='&'
else
q='?'
fi
cmd='curl '$1$q'timestamp='`date +%s`;
exec $cmd;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment