Skip to content

Instantly share code, notes, and snippets.

@bdargan
Last active December 11, 2015 04:18
Show Gist options
  • Save bdargan/4543818 to your computer and use it in GitHub Desktop.
Save bdargan/4543818 to your computer and use it in GitHub Desktop.
shell bash loop with iso8601 date format
export ip="127.0.0.1"; export COUNTER=0; while [ $COUNTER -lt 100 ]; do dt=`date "+%Y-%m-%dT%H:%M:%S"`"+10:00";echo "<165>1 $dt host1:Knock, Knock..." > /dev/udp/$ip/514; let COUNTER=COUNTER+1; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment