It's a nice tool, but it also shows the shortcomings of shell commands.<p>In a proper programming language, we'd have something like<p><pre><code> parallel [1..5], i => { sleep random()*10+5; possibly_flaky i }
// [{"Seq": 4, "Host": ":", "Starttime": 1692491267...
</code></pre>
And `parallel` would only have to worry about parallelization.<p>Instead, the shell environment forces programs to invent their own parameter separator (:::), a templating format ({1}), and a way to output a list of structures (CSV-like). You can see the same issues in `find`, where the exec separator is `\;`, the template is `{}`, and the output is delimited by \n or \0. And `xargs` does it in yet another different way.<p>It's very hard to acquire and retain mastery over a toolbox where every tool reinvents the basics. If you ever found yourself searching "find exec syntax" multiple times in a week, it's not your fault.<p>As for alternatives, I'm a fan of YSH[1] (Javascript-like), Nushell[2] (reinvented from first-principles for simplicity and safety) and Fish[3] (bash-like but without the footguns). Nushell is probably my favorite from the bunch, here's a parallel example:<p><pre><code> ls | where type == dir | par-each { |it|
{ name: $it.name, len: (ls $it.name | length) }
}
</code></pre>
[1] <a href="https://www.oilshell.org/release/latest/doc/ysh-tour.html" rel="nofollow noreferrer">https://www.oilshell.org/release/latest/doc/ysh-tour.html</a><p>[2] <a href="https://github.com/nushell/nushell">https://github.com/nushell/nushell</a><p>[3] <a href="https://fishshell.com/" rel="nofollow noreferrer">https://fishshell.com/</a>