tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
* Shell programming
@ 1999-08-19 10:13 Eskil.Swahn
  0 siblings, 0 replies; only message in thread
From: Eskil.Swahn @ 1999-08-19 10:13 UTC (permalink / raw)
  To: tru64-unix-managers


Hi!

I want to make a shell that contains the launching of another script into
the background so the two scripts run simultaneous. In the first script I
want to pick up the exit value from the subscript? I use ksh for this but
can't get it to work. I've tried something along the following method but
it doesn't do what I want:

test.ksh:

#!/usr/bin/ksh
touch ./test.output
./test2.ksh &
echo $?


test2.ksh:
#!/usr/bin/ksh
sleep 5
return 1


Running test.ksh unfortunately echoes '0' which I had hoped to be '1'. How
do I get it (if possible) to echo '1'?

/Eskil

+--------------------------------------------------------------------+
|                                                                    |
|  Eskil Swahn                                                       |
|  LDC, Lund University                                              |
|  Email: Eskil.Swahn@LDC.lu.se    Web: http://www.ldc.lu.se/        |
|  Phone: +46 46 222 4986          Fax: +46 46 138225                |
|                                                                    |
+--------------------------------------------------------------------+

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-08-19 10:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1999-08-19 10:13 Shell programming Eskil.Swahn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox