![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !! |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| ksh script using expr to calculate percentages | wurzul | Shell Programming and Scripting | 6 | 05-01-2008 03:19 AM |
| calculate time | itik | AIX | 2 | 02-14-2008 11:08 PM |
| how to calculate CPU time under HP-UX | limame | HP-UX | 1 | 06-18-2007 02:28 PM |
| calculate the time differnce between two given timings | Olti | UNIX for Dummies Questions & Answers | 1 | 01-05-2006 10:22 AM |
| Calculate Elapsed Time | sysera | Shell Programming and Scripting | 5 | 06-16-2004 10:10 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#8
|
|||
|
|||
|
Thanks Perderabo,
It looks like timex command is not installed because I don't see in /usr/bin;/usr/local/bin etc. Question about SECONDS variable in ksh : when I do $echo $SECONDS I donot see the no. of seconds past mid night. What I see a very low value which does not seems that it is no. of seconds after mid night. Can you please confirm. Thanks Sanjay |
| Forum Sponsor | ||
|
|
|
#9
|
|||
|
|||
|
Perderabo,
Here is the man page of ksh which describes it like this. SECONDS Each time this variable is referenced, the number of seconds since shell invocation is returned. If this variable is assigned a value, then the value returned upon reference will be the value that was assigned plus the number of seconds since the assignment. Thanks for your suggestion. It looks like SECONDS is what I was looking for. |
|
#10
|
||||
|
||||
|
Quote:
((SECONDS = $(date "+3600*%H+60*%M+%S") )) and, gosh, I just figured that everyone does that! Seriously, I did that so long ago that I forgot. |
||||
| Google The UNIX and Linux Forums |