How is it possible to run multiple commands and background them using bash?
For example:
$ for i in {1..10}; do wait file$i &; done
where wait is a custom binary.
Right now I get an error:
syntax error near unexpected token `;'
when running the above command.
Once backgrounded the commands should run in parallel.
nohup
allowing you to execute a command in the background – Dave Hamilton Mar 23 '16 at 16:03&
and;
are both "command terminators". You don't need to use both:for ...; do wait $arg & done
will work. – glenn jackman Mar 23 '16 at 16:07