| | |
Execution time(plz Help)
Please support our Shell Scripting advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: May 2005
Posts: 215
Reputation:
Solved Threads: 16
I am not really following you. If you just want to know how long the script runs for in seconds. you can just place this line last in the script
Shell Scripting Syntax (Toggle Plain Text)
#!/bin/sh echo $SECONDS #this line will echo 0, beciase this is the very start of the script sleep 10 sleep 1 echo $SECONDS #this final line echos the total execution time of the script(in seconds)
•
•
Join Date: Jul 2005
Posts: 8
Reputation:
Solved Threads: 0
Hello ,
Thanks for the reply,
I can explain it to you in this way,
the script should execute the specified script given as argument 1 ($1)
for the specified number of seconds argument 2 and must sleep for specified number of seconds given as argument 2 and must continue the cycle until argument 1 is executed.
i mean to say that
run script for $2 seconds
sleep $2
and again continue $1
until script get executed
and this must continue until argument 1 is completed.
Can you plz give me any idea for this script
Thanks for the reply,
I can explain it to you in this way,
the script should execute the specified script given as argument 1 ($1)
for the specified number of seconds argument 2 and must sleep for specified number of seconds given as argument 2 and must continue the cycle until argument 1 is executed.
i mean to say that
run script for $2 seconds
sleep $2
and again continue $1
until script get executed
and this must continue until argument 1 is completed.
Can you plz give me any idea for this script
![]() |
Similar Threads
- how to find execution time milliseconds (C)
- Very Very Urgent...Need Code for Calculating Execution Time For Jsp Page (JSP)
- Maximum execution time exceeded. (PHP)
- calculate the execution time of a program (C)
Other Threads in the Shell Scripting Forum
- Previous Thread: Mail script
- Next Thread: A simple script to execute a command package
| Thread Tools | Search this Thread |
Tag cloud for Shell Scripting





