LorenVS LorenVS - 6 months ago 12
Bash Question

Asynchronous shell commands

I honestly can't believe I can't find a solution for this online. I've run across a few things that seem similar, but nothing that really does what I want...

I'm trying to use a shell script to start a command. I don't care if/when/how/why it finishes. I want the process to start and run, but I want to be able to get back to my shell immediately...

Hope thats clear enough, I'm probably just missing something incredibly stupid

Answer

You can just run the script in the background:

$ myscript &

Note that this is different from putting the & inside your script, which probably won't do what you want.

Comments