Posted inCode Simple While – wait for app to quit March 26, 2022No CommentsPosted inCode #!/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 Twitter LinkedIn More Full Mac View All Posts Post navigation Previous Post sw_vers – print macOS version informationNext PostSimple If Statement in Bash script