Fetch and sequentially store webcam images at intervals, v. 0.01

#!/bin/bash
if [ $# -lt 2  ] ; then
  echo foo
  exit 1
fi

if [ $1 -eq $1 2> /dev/null ]; then
  while true
  do
    wget "$2" -O `date +%s`.jpg
    sleep $1
  done
else
  echo bar
  exit 1
fi