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 > UNIX for Dummies Questions & Answers
.
google unix.com



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 !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
wait process pchangba1 UNIX for Advanced & Expert Users 2 12-10-2008 08:58 AM
wait command - cat it wait for not-chile process? alex_5161 Shell Programming and Scripting 2 06-26-2008 07:14 PM
Background Process Shell Scripting dhieraj Shell Programming and Scripting 3 04-12-2008 03:16 PM
How to check process/cpu utilisation thru unix shell scripting manas_ranjan UNIX for Dummies Questions & Answers 0 07-25-2007 05:00 PM
Process Wait on DG UX fabbas UNIX for Dummies Questions & Answers 4 01-07-2004 06:56 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 03-05-2009
sud sud is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 12
Wait Process in Shell Scripting.

Hello,

I have a script that needs to wait till the previous process is done within the same script.But my script doesnt wait till that it is done.Can anyone suggest how I can stop my process till the previous task is done.

I tried 'wait' but I dont have a static process id so is there anyother better way?

pmcmd startworkflow test
wait
echo "Workflow complete"

pmcmd is a command to execute Informatica jobs in Unix.My process needs to wait till the workflow is complete.

Thanks,
Sud.
  #2 (permalink)  
Old 03-05-2009
thegant thegant is offline
Registered User
  
 

Join Date: Oct 2007
Location: Finland
Posts: 7
Hi,
Have you tried sleep?
  #3 (permalink)  
Old 03-06-2009
sunpraveen's Avatar
sunpraveen sunpraveen is offline
Registered User
  
 

Join Date: Jan 2009
Location: Pruthvi
Posts: 85
@thegant, Not sure if sleep would be useful as you don't know for how many seconds the script has to sleep.

@Sud, I suppose you can try:

Code:
 
pmcmd startworkflow test
if [[ $? -eq 0 ]]; then
  echo "Workflow complete"
fi
If the above doesn't suffice, then perhaps you can find the process id of the command and then grep for the process id's completion and then run the next command.

HTH,

Regards,

Praveen
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 05:34 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