← Back to context

Comment by m463

3 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:

  newfile = os.path.join(newpath, os.path.basename(oldpath)) 

IMHO is more self-explanatory and robust.

Also, argparse is the best.