Counters in shell

view story

http://unix.stackexchange.com – I am looking for a shell script where counter needs to be set for input paramter and do action once the count reaches to 5. The problem is there could be n number of input parameter and action should also be dependent on time ... Lets suppose if within 60 mins if count reaches upto 5 then which ever action i want to do ....... I found somthing like below but there is no explanation in this programm.....Please help... #!/bin/sh COUNTER=0 VALUE="-1" echo "Enter a series of lines of numbers separated by spaces." read LIST IFS=" " for VALUE in $LIST ; do eval ARRAY_$COUNTER=$VALUE eval e (HowTos)