The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Passing global variable to a function which is called by another function sars Shell Programming and Scripting 4 06-30-2008 12:39 PM
Function within function (Recurance) chassis UNIX for Dummies Questions & Answers 2 09-19-2006 10:32 AM
function mpang_ Shell Programming and Scripting 1 07-26-2006 01:16 AM
function rkkiran UNIX for Dummies Questions & Answers 3 01-22-2002 03:07 AM
How to convert the "select" function into a "poll" function rbolante High Level Programming 1 07-10-2001 11:49 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 08-10-2006
kakashi_jet kakashi_jet is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 12
TimeDiff function?

Hi,
Is there any function in Unix that could get the Time Differrence of two values? this would be used as statistic for how long a job completes, from start to finish..

Please help.

thanks,
Jet
  #2 (permalink)  
Old 08-10-2006
3Gmobile 3Gmobile is offline
Registered User
  
 

Join Date: Aug 2006
Posts: 18
# time find / -name host*
....
....
....

real 0m12.63s
user 0m1.82s
sys 0m8.44s

#
  #3 (permalink)  
Old 08-10-2006
kakashi_jet kakashi_jet is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 12
Thanks..
Could you explain what the code do?
  #4 (permalink)  
Old 08-10-2006
jim mcnamara jim mcnamara is online now Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,787
time <some command> - does what you want, return elapsed times
find / -name 'host*' - searches for all filenames on the system that start with "host"
  #5 (permalink)  
Old 08-10-2006
Dhruva's Avatar
Dhruva Dhruva is offline
Registered User
  
 

Join Date: Mar 2006
Location: India
Posts: 255
Is there any way to find a execution time of a shell script which have number of commands?
  #6 (permalink)  
Old 08-10-2006
Corona688 Corona688 is offline
Registered User
  
 

Join Date: Aug 2005
Location: Saskatchewan
Posts: 1,960
If you're asking what I think you are, it's time ./shell-script.sh

Or if you're asking for something that tells how many commands the shell script has executed, only the shell script knows.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0