▲ | m463 2 days ago | |
if bash/sh scripts get too long (or long-lived), I switch to python when possible. As a minor example, I hate having to remember (or explain) ${var##pattern} It is useful for manipulating paths, but it is cryptic. in comparison, something like:
IMHO is more self-explanatory and robust.Also, argparse is the best. | ||
▲ | az09mugen 2 days ago | parent [-] | |
That's because you don't use the native lib pathlib from python ! It was a delivery when I knew about it. For example, to join paths, you can do so much easily, see the section "operators" of this link : https://docs.python.org/3/library/pathlib.html |