2

Is it possible to run a command in a for loop without waiting for that command ended, while keeping going to the next iteration?

Because I have to send multi-files at the same time asap via many ssh connections, therefore I couldn't wait until the command ended one by one.

Maybe is it related to something like 'xterm' or 'gnome-terminal'?

Kristianmitk
  • 4,528
  • 5
  • 26
  • 46

1 Answers1

2

Yes, you can execute the command in background by adding & at its end.

So the syntax looks like programName [arguments] & (at least for bourne compatible shells)

Kristianmitk
  • 4,528
  • 5
  • 26
  • 46
  • Thanks I found `(command1 && command2) &` or `(command1; command2) &` difference b/w && and ; is a conditional sequence –  Apr 07 '18 at 04:30