On 12/15/2011 5:21 PM, Toby Thain wrote:
But in any ahem Unix system, you can already do, ad hoc:
$ ls | perl -n -e 'chomp; m/(.*)\.log$/ && rename($_,
"$1.old");'
Use 'find' to do it recursively, of course (try doing *that* in DOS).
Wow, that's so elegant. It only requires spawning two processes, piping
to a general purpose programming language, and using regexps to make it
work!
Wait, is elegant the word I want to use here? Hmm.
- Josh
Insisting it's a "Unix" problem is like saying mammals have prickly
feathers.
--T