Cannot keep shell script running when script ends

I’m trying to leave shell script to run while applescript ends.
This does not work, please show me the right way…

ignoring application responses
	do shell script "cp"
end ignoring
display dialog "applescript done, but shell script still runs!"



You need to tell the shell script to run in the background, which you do by appending “&” to the script:

do shell script "cp / / &"

The & is a standard shell option for running the process in the background so that you can run other tasks.

Still “Display Dialog” shows only after copy is done?


Found the right way:

do shell script "cp / / > /dev/null 2>&1 &"
display dialog "Done"

So we needed to sent the output to /dev/null