The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

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
Estimated execution time Sreejith_VK Shell Programming and Scripting 4 04-16-2008 09:23 AM
specifying an execution time VGR UNIX for Advanced & Expert Users 7 03-19-2008 05:32 AM
last execution time cubs0729 UNIX for Dummies Questions & Answers 1 01-20-2006 08:45 PM
Reduce boot-time delay on FreeBSD? DownSouthMoe BSD 1 03-28-2004 03:07 AM
execution time ramki_rk High Level Programming 2 08-27-2003 09:23 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-12-2008
Sreejith_VK
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
To reduce execution time

Hi All,

The below script I run daily and it consumes 2 hours approx.
In this I am calling another script and executing the same twice.
Is the loop below the cause for the slow process?Is it possible to finetune the program so that it runs in a much faster way?

The first script:
Code:
#!/bin/ksh

for file in 1 2
do
echo "Started on `date`" | tee -a secondscript.log
secondscript.sh   2>&1| tee -a secondscript.log
echo "Ended on `date`" | tee -a secondscript.log
done
Second script contains hundreds of compilation statements(Those are error free).

Last edited by Sreejith_VK; 05-13-2008 at 12:05 AM..
  #2 (permalink)  
Old 05-12-2008
Cameron's Avatar
Cameron Cameron is offline Forum Advisor  
Registered User
  
 

Join Date: Nov 2001
Location: Brisbane, Australia
Posts: 499
Nothing wrong with your loop.
It will be what you are doing in the 'secondscript.sh'.
Being that you are executing hundreds of compilation statements, then it might be reasonable that it takes a while.
Are you able to post the contents of the 'secondscript.sh' ??

Cheers,
Cameron

p.s. - Need to drop or qualify "$dayext" in your script too.

Last edited by Cameron; 05-12-2008 at 08:51 PM.. Reason: $dayext notation.
  #3 (permalink)  
Old 05-13-2008
Sreejith_VK
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Thanks Cameron for your clarification.
  #4 (permalink)  
Old 05-13-2008
Sreejith_VK
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Removed duplicate post

Last edited by Sreejith_VK; 05-13-2008 at 03:09 AM.. Reason: Removed duplicate post
  #5 (permalink)  
Old 05-13-2008
Sreejith_VK
Guest
  
 

Posts: n/a
Bits: 0 [Banking]
Removed duplicate post

Last edited by Sreejith_VK; 05-13-2008 at 03:09 AM.. Reason: Removed duplicate post
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 06:25 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