I couldn't resist throwing my hat into this ring. I can imagine an unsophisticated user who might not trust himself to replace one pattern with another, but doesn't want to repeat a long list of mv commands. Here's a simple script (1.5) that takes a list of filenames (perhaps provided by wildcards) as input, and prompts the user for a new name for each file:
-n | #!/bin/sh # Usage: newname files for x do echo -n "old name is $x, new name is: " read newname mv "$x" "$newname" done |
---|
For example:
touch | % |
---|
This script is so simple, it's not included on the disc. I just thought I'd throw it in to demonstrate that there's more than one way to do it, even if you aren't using Perl (18.10).
-