LoginSignup
7
6

More than 5 years have passed since last update.

シェルスクリプトで簡易に待ち合わせ処理を書く

Posted at

とあるjavaのプロセスが終わるのを待って別のjavaのプロセスを実行したいときとかに。

for i in 1
do
  printf "Waiting for other process"
  while $(ps aux | grep \[j\]ava -q)
  do
    printf "."
    sleep 1
  done
  printf "done, Start for %d .\n" "${i}"
  java -version
  sleep 10
done
7
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
7
6