Results 1 to 2 of 2

Thread: Shell scripting for counters

  1. #1
    Junior Member
    Join Date
    Nov 2012
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Rep Power
    0

    Default Shell scripting for counters

    Hello Team,

    I am looking for a shell script where counter needs to be increase as x value gets increase(which is an input paramter) and do whichever action i want 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 .......like if i want to send email once counter reaches upto 5 within 60 mins....

    Thanks
    Raghav

  2. #2
    Senior Member
    Join Date
    Aug 2011
    Posts
    367
    Thanks
    0
    Thanked 55 Times in 51 Posts
    Rep Power
    7

    Default

    hi,

    the way you expose your problem doesn't help you much, of course.

    calm down.

    what shell are you allowed to use?

    first, do a simple loop to count until 5.

    next, when the script begins record the actual date and time since Epoch
    then, at each loop test if recDate is more or less recDate+60x60secondes
    «A problem clearly stated is a problem half solved.»

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Need help for Linux-shell scripting
    By nitin20_jd in forum Shell scripting
    Replies: 1
    Last Post: 30th April 2012, 01:39 AM
  2. [Solved] Shell scripting loop
    By chinalinix in forum Shell scripting
    Replies: 6
    Last Post: 24th August 2010, 01:31 PM
  3. Very much new to shell scripting
    By anil2208 in forum Shell scripting
    Replies: 3
    Last Post: 16th December 2009, 10:25 PM
  4. Shell Scripting Under Windows
    By Komal in forum Shell scripting
    Replies: 2
    Last Post: 24th November 2009, 01:37 PM
  5. need help on shell scripting
    By rahul_sayz in forum Shell scripting
    Replies: 1
    Last Post: 8th December 2007, 10:37 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41