discovered a cool trick for writing a script that runs some commands in parallel and waits for all to complete while also logging and propagating errors properly
bonus: the script also takes an optional command line argument specifying which subcommand to run
The more experience I accumulate over the years the less I care for installing cool new tools and the more interested I am in really honing my use of the tools that are already installed everywhere (and have been for 30 years) and finding neat and powerful ways to wield them
@hailey make is super useful for running things in parallel, I often find myself defaulting to it nowadays whenever I have a problem that looks like "run commands in parallel". Never seen it used like this with the hashbang though, that's really clever

@hailey couple of years ago i rewrote an old clunky python script that ran things in parallel with a makefile instead. It still has a much smaller python script but all it does is generate a file named ".rules" that gets included by gmake:

https://github.com/chocolate-doom/statcheck/blob/trunk/GNUmakefile

statcheck/GNUmakefile at trunk · chocolate-doom/statcheck

Vanilla Doom statdump regression testing. Contribute to chocolate-doom/statcheck development by creating an account on GitHub.

GitHub

@hailey I think I am becoming the same, I realized I should learn the "old" UNIX tools like awk earlier because of how often I hack small throwaway scripts

Nice use of make too, thanks.

@hailey

-S, --split-string=S
process and split S into separate arguments; used to pass multiple arguments on shebang lines

...

The -S option allows specifying multiple arguments in a script. Running a script named 1.pl containing the following first line:

#!/usr/bin/env -S perl -w -T
...

Will execute perl -w -T 1.pl

Without the '-S' parameter the script will likely fail with:

/usr/bin/env: 'perl -w -T': No such file or directory