#!/bin/bash
# Written by hip0
# Sat Oct 29 2011
# handy script to be set to execute set of commands under variables command1_to_exec and command2_to_exec every 5 seconds via cron
# The timing can easily be adjusted of course by changing "sleep 5" to "sleep any_number_of_secs"
# to set via cron definition should be like
# * * * * * /path/to/exec_every_5_secs_cmds.sh
# God is great! ;) 
command1_to_exec='/bin/ls';
command2_to_exec='/bin/pwd';
for i in $(echo 1 2 3 4 5 6 7 8 9 10 11); do 
sleep 5; 
$command1_to_exec; $command2_to_exec; 
done
