I want to background a command chain like
cp a b && mv b c && rm a.
I have tried doing
cp a b && mv b c && rm a & but this only backgrounds the last process.
How do I background a command chain?
Same with pdksh, ksh93, bash, csh, tcsh.
The exception is zsh, which is weirdly incompatible. This is documented in the manual:
Unfortunately, zsh behaves in this way even in sh or ksh compatibility mode. To make sure that the whole command is executed in the background, put braces or parentheses around it. Parentheses create a subshell whereas braces don't, but this is irrelevant (except as a micro-optimization in some shells) since a backgrounded command is in a subshell anyway.
you can put it into parantheses like