Sponsored Content
Top Forums Shell Programming and Scripting 60 second Timer with Shell Script Post 302358599 by Dedalus on Saturday 3rd of October 2009 11:17:50 AM
Old 10-03-2009
Hi

this is not the best solution, but you can improve it.

Code:
input=60
tic=`date +%S`
elap_time=0

while [ "$elap_time" -le "$input" ]; do

toc=`date +%S`
elap_time=`expr $toc - $tic`
done

echo "time elapsed"

EDIT: Sorry I don't answ to your question, becouse you want display it.

Bye

Last edited by Dedalus; 10-03-2009 at 12:28 PM..
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

timer

Hi all, Wanted to a create a shell script ----------------------------------------------------------------------- 1) which when called will start a timer and wait for 48 hours. after 48 hours it will call some function(say XYZ) 2) Whenever this shell script is called (can be called... (3 Replies)
Discussion started by: k_oops9
3 Replies

2. UNIX for Dummies Questions & Answers

script run timer

any of you guys have a script for measuring the run time of any given script, where you would sandwich your own script between the timer script or something? thanks! :) (2 Replies)
Discussion started by: mark_nsx
2 Replies

3. Shell Programming and Scripting

Simple script? First timer...

Hey guys, I'm brand new to the bash scripting world, here's my issue.. When people SSH to my box, I'm wanting to use screen to monitor them if I so choose. So, I've created a new user: testing, and I've set its startup shell to /bin/myshell.sh whose contents read this: #!/bin/sh $me =... (4 Replies)
Discussion started by: poon
4 Replies

4. Shell Programming and Scripting

Timer

Is there a way to make a timer? E.g Please give the seconds... ... (6 Replies)
Discussion started by: aekaramg20
6 Replies

5. Shell Programming and Scripting

Startup Script "run process with Timer"

Hi I have a script that execute every X minute for checking new files in a folder and converting to pdf. Is there any way to start this script automatically on linux startup?. I use sleep function in script with infinite loop. while do killall -u `whoami` -q soffice soffice... (0 Replies)
Discussion started by: zawmn83
0 Replies

6. UNIX for Dummies Questions & Answers

Timer

is there a timer function in unix without using C? for example i want to display a message after 5 seconds how do i do that? (2 Replies)
Discussion started by: khestoi
2 Replies

7. Shell Programming and Scripting

Perl script timer on program launch

So I am attempting to get a short but complex perl script to be able to time out an application that I will launch from a command line. The terminal I use is MKS C SHELL and I am having trouble doing the a job spawn that will launch the application and keep time on it. I know you could do this... (1 Reply)
Discussion started by: vas28r13
1 Replies

8. UNIX for Dummies Questions & Answers

Shell Script / Timer

Hey folks, We already got a working Script running, but actually we gotta start it manually but at least we want to run it like every 30minutes 1time. Could anyone give it a shot? #!/bin/sh for i in A B C D E F G H I J K L M N O P Q R S T U V W X Z do ln -sv /x/$i/*/PDF/001-*.*... (1 Reply)
Discussion started by: Yjerith
1 Replies

9. Shell Programming and Scripting

Looping in the shell script with help of script timer.

Hello Experts- We are facing some issues in the while loop script when we use the script time to decide whether to exist from the loop or continue. Below is the script SrcExitLoop="FALSE" Src_InitialStartTime=`date +%s` Src_StartTime=`date +%s` Src_NUM_ALERTS=0 TOTAL_ALERTS=`expr <SOME... (4 Replies)
Discussion started by: Amey Joshi
4 Replies

10. UNIX for Dummies Questions & Answers

Help please with FTP timer script

Hi Could somebody please help me with this code? ------------------------------------------ @ftp -i -s:"%~f0"&GOTO:EOF open mysite.co.uk myusername mypassword !:--- FTP commands below here --- cd public_html/ binary lcd c:\ put myfile.jpg bye ... (3 Replies)
Discussion started by: dobbies
3 Replies
doctools::msgcat::toc::fr(n)					Documentation tools				      doctools::msgcat::toc::fr(n)

__________________________________________________________________________________________________________________________________________________

NAME
doctools::msgcat::toc::fr - Message catalog for the doctoc parser (FR) SYNOPSIS
package require Tcl 8.4 package require msgcat package require doctools::msgcat::toc::fr ?0.1? _________________________________________________________________ DESCRIPTION
The package doctools::msgcat::toc::fr is a support module providing the FR (french) language message catalog for the doctoc parser in the doctools system version 2. As such it is an internal package a regular user (developer) should not be in direct contact with. If you are such please go the documentation of either [1] doctools::doc, [2] doctools::toc, or [3] doctools::idx Within the system architecture this package resides under the package doctools::msgcat providing the general message catalog management within the system. Note that there is no explicit dependency between the manager and catalog packages. The catalog is a plugin which is selected and loaded dynamically. API
This package has no exported API. BUGS, IDEAS, FEEDBACK This document, and the package it describes, will undoubtedly contain bugs and other problems. Please report such in the category doctools of the Tcllib SF Trackers [http://sourceforge.net/tracker/?group_id=12883]. Please also report any ideas for enhancements you may have for either package and/or documentation. KEYWORDS
FR, catalog package, doctoc, doctools, i18n, internationalization, l10n, localization, message catalog, message package CATEGORY
Documentation tools COPYRIGHT
Copyright (c) 2009 Andreas Kupries <andreas_kupries@users.sourceforge.net> doctools2toc 0.1 doctools::msgcat::toc::fr(n)
All times are GMT -4. The time now is 05:15 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy