Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
バックグラウンドでの有限タスクの最終結果:
( wget google.com && zenity --info || zenity --error ) & PID=$! ...if ... kill $PID ...zenity ...
なぜ彼は行動しないのですか?どのようにすれば良いですか?
[編集:] 修正しました、ありがとう。
あなたが投稿したものwgetで、バックグラウンドで開始しますが、開始されたzenity直後に実行wgetされます。したがって、wgetの戻り値を取得する可能性はまったくありません:wgetまだ完了していません!
wget
zenity
次のようなものを試してください:
( wget google.com && zenity --info || zenity --error ) & PID=$! if ... kill $PID ...zenity ...