3 ms·
Yup, it seems the perfect example to wonder if a language with async by default is appropriate for the use cases of bash scripts. The example runs 7 commands a
by pmontra 3y ago
Yup, it seems the perfect example to wonder if a language with async by default is appropriate for the use cases of bash scripts.
The example runs 7 commands and has to explicitly await for 4 of them. The other 3 can run in parallel and it awaits for the end of all of them, which is fair.
The typical bash script is sequential and I fear that its zx replacement will be an exercise of writing await, await, await.
I'd go with an await by default language and wrap parallel code in whatever that language offers to wait for the end of child processes.