1998-01: After switching from MS-DOS to Linux, I stopped writing C-programs to make Dos more Unix-like and began writing shell scripts to make Linux more Dos-like:-) Actually my only script of that sort, rename, goes well beyond the simple-minded globbing the Dos rename can do. My first Linux, an early version of Red Hat Linux, had no rename command so I wrote one. [Linux has had a rename since circa 1999, in the util-linux package, that's almost identical to mine, however I still prefer mine.]
Here are some general-purpose shell (bash) scripts, written between 1998 and the present:
| rename | -- systematically rename multiple files according to a specified pattern |
| chg | -- systematically revise files according to a specified pattern (or filter) |
| chgsed | -- my usual way of invoking chg |
| unchg | -- undo chg |
| fullnameNOSLASH | -- needed by several other scripts; reversibly converts pathname to filename |
| fullnameRESLASH | -- needed by several other scripts; the inverse of fullnameNOSLASH |
| arr | -- filter to re-arrange columns of a file |
| url-decode | -- needed by several other scripts; does URL-decoding (percent-decoding) |
| bc | -- an extended bc for floating-point arithmetic in bash-scripts |
| datecvt | -- needed by other scripts |
| scalepix | -- image scaling and annotating, for webpage-making, preparing a set of photos for emailing, etc (any image type) |
| annotatepix | -- needed by scalepix; also used on its own, eg by mk-calendar-covers (only for PPM images) |
Incidentally since I avoid filenames containing spaces, some of my scripts may not behave as desired on such names; however, my rename script does handle them and one of its uses is to correct them when people send files so named.
Disclaimer: some of these were written before I knew bash well enough to attempt such things:-)