2

i would like to run two or more commands asynchronously.

How to achieve that? I need to run more cURL requests asynchronously.

Tadeáš Jílek
  • 2,813
  • 2
  • 19
  • 32
  • Unless you have some other requirement, opening multiple shell windows is probably the simplest way...no need for fg/bg switching. – Phillip Mills Dec 18 '17 at 20:01
  • 1
    Possible duplicate of [How do you run multiple programs in parallel from a bash script?](https://stackoverflow.com/questions/3004811/how-do-you-run-multiple-programs-in-parallel-from-a-bash-script) – gonczor Dec 18 '17 at 20:01

1 Answers1

6

You can use & to send command to background.

$  pwd &
[1] 1720
/Users/gonczor
[1]+  Done                    pwd
gonczor
  • 3,994
  • 1
  • 21
  • 46