0

If you write a 1 line shell script that forks a process, like the following: for i in {1..1000};do ./binary & done

It runs, you don't need a semicolon, and if you try to use a semicolon it throws a syntax error.

In a normal loop, without forking, you need the semicolon for it to work in a 1 line script. Why does the fork operator change how this works?

Cyrus
  • 12,309
john doe
  • 836

0 Answers0