From: Thomas Schweikle <tps@vr-web.de>
To: gentoo-user-de@lists.gentoo.org
Subject: [gentoo-user-de] Re: Bash-Skript Frage
Date: Sat, 20 Aug 2005 12:04:23 +0200 [thread overview]
Message-ID: <43070027.3030204@vr-web.de> (raw)
In-Reply-To: <43021EF0.20408@freenet.de>
Nils Andresen schrieb:
> Moin,
>
> Volker Katz wrote:
>
>> Also in der Art:
>>
>> /bin/job1 &
>> /bin/job2 &
>> /bin/job3 &
>> while (not job1 finished && not job2 finished && not job3 finished)
>> /bin/job4
>>
>>
> Macht
> ( /bin/job1 & /bin/job2 & /bin/job3 ) && /bin/job4
> nicht das ?!
Nein, macht es nicht:
- job 1 wird im Background ausgeführt
- job 2 wird im Background ausgeführt
- job 3 wird im Vordergrund ausgeführt
nach *erfolgreichem* beenden von job 3 wird job 4 ausgeführt.
Die Klammern um job 1 bis job 3 sorgen nur dafür, dass das Environment
(bis auf den Rückgabewert) nicht verändert wird.
(sleep 60 & sleep 60 & sleep 5) && echo "Fertig!"
ps axf nach 0s:
13619 pts/1 Ss 0:00 \_ -/bin/bash
2846 pts/1 S+ 0:00 | \_ -/bin/bash
2847 pts/1 S+ 0:00 | \_ sleep 60
2848 pts/1 S+ 0:00 | \_ sleep 60
2849 pts/1 S+ 0:00 | \_ sleep 15
ps axf nach 10s:
2847 pts/1 S 0:00 sleep 60
2848 pts/1 S 0:00 sleep 60
ps axf nach 61s:
Die richtige, funktionierende Lösung steht in
<20050816151216.GA32458@stovokor.kiste.lan>
--
Thomas
--
gentoo-user-de@gentoo.org mailing list
next prev parent reply other threads:[~2005-08-20 10:07 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-16 14:16 [gentoo-user-de] Bash-Skript Frage Volker Katz
2005-08-16 15:12 ` Emil Beinroth
2005-08-16 17:14 ` Nils Andresen
2005-08-20 5:01 ` Karsten Schulz
2005-08-20 10:04 ` Thomas Schweikle [this message]
2005-08-20 10:39 ` [gentoo-user-de] " Hendrik Jürgens
2005-08-20 13:16 ` Thomas Schweikle
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=43070027.3030204@vr-web.de \
--to=tps@vr-web.de \
--cc=gentoo-user-de@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox