3 ms·
Yeah, it doesn't do much. But every so often I find myself needing to change the extension of a bunch of files somewhere and needing to write something like "f
by antognini 10y ago
Yeah, it doesn't do much. But every so often I find myself needing to change the extension of a bunch of files somewhere and needing to write something like "for f in $(ls *.txt); do ... " and then I have to remember how to strip out the prefix (do I use # or % or ##?), and then I have to try it out on a set of test files to make sure I'm not accidentally deleting them all.
I figured I would write something in the Unix philosophy to spare me (and maybe others) the trouble. It does exactly one thing, and it (hopefully) does it well. It was also fun to learn how to write a man page and do unit tests for a shell script.