nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

need help

This is a discussion on need help within the Shell scripting forums, part of the Development/Scripting category; I would like to time how long does a process take to complete and pipe to a log file. I ...


Go Back   nixCraft Linux Forum > Development/Scripting > Shell scripting

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 03-10-2006, 11:48 PM
Junior Member
 
Join Date: Oct 2005
Posts: 4
Rep Power: 0
pliu0606
Default need help

I would like to time how long does a process take to complete and pipe to a log file. I have tried the following, but the output was only to the screen not to the log file:

time cp grid.tar /export/pcliu/ >> temp.log

Is there any way to send the output to the log file... Please help...
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 03-11-2006, 12:06 AM
sweta's Avatar
Contributors
User
 
Join Date: Feb 2005
Location: New Delhi
My distro: Suse, RHEL, Vista
Posts: 154
Rep Power: 4
sweta will become famous soon enough
Default

use eval command to read ARG as input to the shell and execute the resulting command, for example:
Code:
eval time cp grid.tar /export/pcliu/ 2>>temp.log
__________________
Friends - v-nessa - missyAdmin - LinuxChix
Reply With Quote
  #3 (permalink)  
Old 03-11-2006, 12:58 AM
Junior Member
 
Join Date: Oct 2005
Posts: 4
Rep Power: 0
pliu0606
Default

thank you very much....
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 +5.5. The time now is 05:26 PM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36