osascript dialog box is blocking. I'm using osascript to display dialog box from bash script, but it's blocking the script, until i press the 'ok' button.

I wonder if there's a way to make this display window asynchronous.

osascript -e 'tell app "System Events" to display dialog "'"${msg}"'"'


This means that the script will continue running and the osascript will run on the background.
You can add ampersand (&amp;) at the end of the line. Quote from bashitout:


  A single ampersand &amp; can often be found at the end of a command.

 ./myscript.py &amp; 

  
  This trailing ampersand directs the shell to run the command in the background, that is, it is forked and run in a separate sub-shell, as a job, asynchronously. The shell will immediately return the return status of 0 for true and continue as normal, either processing further commands in a script or returning the cursor focus back to the user in a Linux terminal.