Linux – Wait until a specific pattern is written on log using tail and sed

In the Ant build.xml, i need to make sure the JBoss server is started before running the test cases. There are 2 possible approaches.

  • Using twiddle.sh to check the status
  • Monitoring server.log until “Started in” is written on it

 

I took the 2nd approach. Here is an example output log when the JBoss server is started successfully.

One thought on “Linux – Wait until a specific pattern is written on log using tail and sed”

Leave a comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.