Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Reply-To: Cygwin List Message-Id: <6.1.0.6.0.20040418203043.02fbd298@127.0.0.1> X-Sender: Date: Sun, 18 Apr 2004 20:31:57 -0400 To: Thomas L Roche , cygwin AT cygwin DOT com From: Larry Hall Subject: Re: [OT?] make bash script wait for called program to finish? In-Reply-To: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 08:01 PM 4/18/2004, you wrote: >Tom Roche Sunday, April 18, 2004 6:20 PM >>>> what I'd like my script to do is > >>>> 0 wget > >>>> 1 launch the extractor UI, which I will briefly twiddle > >>>> 2 wait for the extractor to finish > >>>> 3 check that the installer and images were created > >>>> 4 run the installer on the images > >>>> I know how to script everything but 2 > >Barry Buchbinder Sun, 18 Apr 2004 18:56:47 -0400 >>> How about the following? >>> $ cmd /c start /wait program_being_waited_for > >Thanks! I've never run windows' shell from bash, but that does the >job. > >Larry Hall Sun, 18 Apr 2004 19:12:03 -0400 >> Should we assume that 'wait' didn't work for you? > >I didn't try that: doesn't 'wait' just wait for the given period >(arg=n)? If so, that would be at best a kludge. No. 'n' is a proc id. See 'man bash'. Barry's suggestion is likely to be better though, considering that you're starting a Win32 process. -- Larry Hall http://www.rfk.com RFK Partners, Inc. (508) 893-9779 - RFK Office 838 Washington Street (508) 893-9889 - FAX Holliston, MA 01746 -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/