#!/bin/bash

rand=`od -An -N1 -d /dev/random | tr -d '[:blank:]'`
sleep_time=`expr ${rand} % 10 + 1`

before=`date '+%Y-%m-%d %H:%M:%S'`
echo "${before} >>> start ${0} (PID: $$, argv: ${1}, sleep_time: ${sleep_time})"
sleep ${sleep_time}
after=`date '+%Y-%m-%d %H:%M:%S'`
echo "${after} <<<   end ${0} (PID: $$, argv: ${1}, sleep_time: ${sleep_time})"