How to get the counter value incremented after every 1 min?


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting How to get the counter value incremented after every 1 min?
# 1  
Old 07-13-2010
How to get the counter value incremented after every 1 min?

I want to check the counter value for every 1 min until the particular counter value is reached and it should exit.

Counter value: 15.( For Example)


Code:
counter = 1

The start time is noted using Localtime.

How can i do this in perl?

Regards
Archana

Last edited by vanitham; 07-13-2010 at 04:22 AM..
# 2  
Old 07-13-2010
you can use cron tab to do check every min write script to check the value and run from cron tab every min
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Copying a file based on a incremented folder name

I need to routinely cp a file out of the highest incremented folder named PROD_2_6.1_xxx where xxx (3 numerical values) is incremented only once a night starting at 100 and ending 999 over a period of time. I am not worried about copying a subset of a complete file while it is being created by some... (5 Replies)
Discussion started by: sf_cb
5 Replies

2. Shell Programming and Scripting

Environment variable need to be incremented

Dear All, I have created a environment variable say VAR and initialised it to 0.when i do echo $VAR it is showing 0.I have written a shell script with one line VAR=$((VAR+1)) and after running the shell script when i echo $VAR my output is still 0.I want to be 1. when i run the statement... (3 Replies)
Discussion started by: pracheth
3 Replies

3. Shell Programming and Scripting

Counter

if ;then echo "mrnet greater 5000" gzip /var/log/mrnet.log mv /var/log/mrnet.log.gz /var/log/mrnet.log.1.gz if ];then i=1 let i++ mv /var/log/mrnet.log.1.gz /var/log/vieux-logs/mrnet.log.$i.gz else echo "theres no... (1 Reply)
Discussion started by: Froob
1 Replies

4. Homework & Coursework Questions

Min/Max/counter/while loop from file

Use and complete the template provided. The entire template must be completed. If you don't, your post may be deleted! 1. The problem statement, all variables and given/known data: The program is supposed to read in text from a given file ( different samples provided in the homework but not... (1 Reply)
Discussion started by: c++newb
1 Replies

5. Shell Programming and Scripting

Replace the content of file with incremented value

I have a file myfile with only one value 1000.I am using it in a shell script.Each time i run the script,the file shud get incremented by 1. I have used the below code for incrementing the value- curr=`cat myfile` echo $curr curr=`expr $curr + 1` But i am not sure how to save this replaced... (2 Replies)
Discussion started by: saga20
2 Replies

6. Shell Programming and Scripting

How to read a delimited string and assign fields to incremented variables?

How can I read a string delimited on spaces and assign the fields to incremented variables. For example: Given $exts= txt dat mov I want to read in $exts and have "txt" "dat" and "mov" assigned to incremented variables like $ext1, $ext2, etc. I would like to do this in a loop so that I can... (4 Replies)
Discussion started by: runit
4 Replies

7. Shell Programming and Scripting

grep and counter

Hi, I have such an example(ksh): name1=Example directory=/directory1/Example/directory2 match=$(grep -s '$name1' $directory | wc -l) echo $match But it replies to me: 0 What I expect from it, is to find $name1 in $directory and produce 1 for me as true, not false. (3 Replies)
Discussion started by: chish
3 Replies

8. Shell Programming and Scripting

counter

Hi, I need some help. Shell script counter. i need to add condition to check if counter is more than 10 and longer than 3 hours? it runs every 5 mins. it only check count and send email right now. it runs in cron as below gregcount.ksh gregdb 10 > /tmp/gregcount.out 2> /tmp/gregcount.err ... (1 Reply)
Discussion started by: pega
1 Replies

9. Shell Programming and Scripting

Counter Script..help please

I have generated a script that will email a list of people if a certain PID is not running, using "mailx". I have the script running every 5 minutes as a cron job. I want the script to stop sending an email, if the email has been sent 5 times (meaning PID is dead). I want this so that my... (3 Replies)
Discussion started by: Sunguy222
3 Replies

10. Shell Programming and Scripting

generate file incremented by 1

Hi I a really need help. I got simply shell script which store result into the specific file in this case xxx_001.txt And after another run script I would like to create the same file but value 001 is incremented by 1 -> xxx_002.txt a so on. If I gonna use awk utility then result... (4 Replies)
Discussion started by: mape
4 Replies
Login or Register to Ask a Question