newbie: Out of order execution in script

schwarza@gdls.com schwarza@gdls.com
Mon Nov 27 06:34:00 GMT 2000


Bernard;

I'm sure as sure can be, but not being as sure as sure
can't be, here is the script. What it does is to do a
breadth-first tree walk of the Rational views to determine
all views (directories) required for a particular Ada
compile (or any Rational compile). I think it rather
straight-forward within the limitations imposed by using
BASH.

But, if you see that it contains some imperative causing
incorrect execution then please tell me what you've found.
However to confound matters this script and it's calling
script worked without error (was inerrant) using Cygwin-B20.1.

Thanks

art

(See attached file: import.sh)




Bernard Dautrevaux <Dautrevaux@microprocess.com> on 11/23/2000 09:31:31 AM

To:   "'schwarza@gdls.com'" <schwarza@gdls.com>, cygwin@cygwin.com
cc:
Subject:  RE: newbie: Out of order execution in script

> -----Original Message-----
> From: schwarza@gdls.com [ mailto:schwarza@gdls.com ]
> Sent: Tuesday, November 21, 2000 11:58 PM
> To: cygwin@cygwin.com
> Subject: newbie: Out of order execution in script
>
>
>
>
> I'm using the latest 'stable' version of cygwin (1.1.5) on a
> Win95 platform
> It looks like a script was executed after the statement following the
> script started - out of order execution. Is this possible?
>
> In a script I execute:
>
> importScript=<path>/import.sh
> importMain=<filename>
> tmp=/tmp/$$.gnatmake
> gnatI=${tmp}/gnatI
> outImp=${tmp}/<filename>
>
> ${importScript} ${importMain} ${tmp}
>
> sed -e '/(/d'                             \
>     -e 's@/kostabi@@'                     \
>     -e 's@^@\ -aI/kostabi@'               \
>     -e 's@/@\\@g'           ${outImp}.imp > ${gnatI}
>
> The messages below are:
>
> [1] sed: can't read
> /tmp/398883.gnatmake/device_control_main.imp: No such
> file or directory
>
> [2] Main file:  device_control_main
>
> which come in the exact order shown.
>
> The issue is that message [2] is output by the
> ${importScript} line, and
> message [1] indicates that the script has not executed.
>
> In looking at ${tmp} I do see a successful generation of the
> output file
> (${outImp}.imp) indicating that the statement before the 'sed' was run
> successfully. I'm guessing that the 'sed' was executed before
> the script
> was started, and failed because the output file was not
> generated. This
> script ran successfully under cywin-b20.1 and I don't see
> what I'm doing
> wrong.
>
> Any idea what I did?
>

What would be interesting would be to describe what your "import.sh" script
is doing; sure it does not start a workhorse process in the background the
exit?

Just an idea :-)

           Bernard

--------------------------------------------
Bernard Dautrevaux
Microprocess Ingenierie
97 bis, rue de Colombes
92400 COURBEVOIE
FRANCE
Tel:       +33 (0) 1 47 68 80 80
Fax:       +33 (0) 1 47 88 97 85
e-mail:         dautrevaux@microprocess.com
                     b.dautrevaux@usa.net
--------------------------------------------



-------------- next part --------------
A non-text attachment was scrubbed...
Name: import.sh
Type: text/x-shellscript
Size: 3437 bytes
Desc: not available
URL: <http://cygwin.com/pipermail/cygwin/attachments/20001127/e2b4ebe0/attachment.bin>


More information about the Cygwin mailing list