7

Can we use semicolon to separate a background job from the following one?

$ nohup evince tmp1.pdf &; nohup evince tmp.pdf &
bash: syntax error near unexpected token `;'
Tim
  • 101,790

1 Answers1

18

No.

First of all, that's a semicolon, not a comma. A comma can't ever be used to separate jobs. For background jobs, nothing else is needed. The & already serves to separate jobs:

$ nohup evince tmp1.pdf & nohup evince tmp.pdf &

Of course, in this case, it would be simpler to run

$ nohup evince tmp1.pdf tmp.pdf &
terdon
  • 242,166