(Modified 2010 Feb 12)
Some shell scripts
DEL
I'm leery of using a wild card with the rm command, so I wrote DEL. I think I reverse-engineered the syntax from a script from my colleague David Morgan. The syntax is as follows:
DEL "file_series*"
The quotations are necessary. The script will list all of the files that are about the be deleted, and then prompts for a carriage return. So, if you accidentally included too many files, you can hit CTRL-c to get out. I use this script all the time.
mmv
Currently, many graphical file managers have intelligent batch-rename functions. However, this wasn't always the case. What I wanted to be able to do was substitute one string for another in a series of files. The syntax is:
mmv "files_before*.dat" before after
The result of this command would be a series of files called files_after*.dat. Like with DEL, you have to hit carriage return before the script makes the changes.
This page is Lynx-enhanced