Simple While – wait for app to quitBy Ed / March 26, 2022 / Leave a Comment / Bash Scripts, ScriptsBash Scripts, Scripts #!/bin/bash while [ $( pgrep TextEdit ) ] do echo Waiting for TextEdit to quit. sleep 2 done echo TextEdit has quit. Link: https://www.youtube.com/watch?v=UQs7-N2_35k Share via: Facebook X (Twitter) LinkedIn More