If I want to run a script in background, for example a.sh
, should I run
./a.sh &
or should I put it in a subshell then background it?
(./a.sh) &
I test both and don't see difference, both works, can anyone tell me when should I use ()&
or just &
? what's the real difference and cautious?
(./a.sh &)
which really is different. – Jun 08 '19 at 08:20