Skip to content

Instantly share code, notes, and snippets.

@khanof89
Created January 13, 2015 17:01
Show Gist options
  • Save khanof89/db00a2caeaa4b707fbde to your computer and use it in GitHub Desktop.
Save khanof89/db00a2caeaa4b707fbde to your computer and use it in GitHub Desktop.
bash command
#!/bin/bash
while true; do
begin=`date +%s`
curl GET http://127.0.0.1/getmovieposter
end=`date +%s`
if [ $(($end - $begin)) -lt 5 ]; then
sleep $(($begin + 5 - $end))
fi
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment