4 ms·
On automation, if you are building the config dynamically from external or computed parameters, in the case of a config file you'll need to: - open some descri
by makeitdouble 4y ago
On automation, if you are building the config dynamically from external or computed parameters, in the case of a config file you'll need to:
- open some descriptor on the system
- write the file content
- execute the command
- get rid of the file
Of course you'll also need to deal with the constraints/failure of any of these steps (write the file in a location the program can access, take care it still exists or is not overwritten when you run the command, so have pseudo random names and/or lock the file, etc.)
In comparison, passing it all as args is one single step.
- closeparen 4y agoFair. There are all those "configuration management" frameworks that make templating out config files from data a fairly solved problem, but if you're launching programs from other programs that you also wrote, I guess it's less code to have an arbitrarily long arguments list vs. also dealing with files.