Mailing List Archive


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [tlug] Old dogs / new tricks (was: Kubuntu v5.10)



This makes me wonder how anybody ever finds out about the
existence of rename(1) without getting informed about it on a
mailing list or something.

I mean, I read a lot of docs, and I have never come across mention
of it. For example, nothing in "Unix Help for Users" (at least
not that I know of) or in similar docs intended for newbies (the
people who might benefit most from having it).

Is it because it's just too trivial for old-schoolers to
just write a one-line bash script or function for doing it?  Or
because it's just a Perl script? 

Or maybe it is sort of a dangerous thing to publicize too much a
command for doing batch renaming, given what you might end up with
if you make a regex mistake?

  --Mike

Godwin Stewart <godwin.stewart@example.com> writes:

> On Sun, 25 Dec 2005 20:38:41 +0900, Josh Glover <jmglov@example.com> wrote:
> 
> > For example, just a few months back, a Junior Software Engineer at my
> > job taught me about the rename(1) program
> 
> Darn, that's a new one on me too!
> 
> Until now I'd been doing stuff like:
> 
> $ for f in $glob; do mv -v "$f" "add_this${f#remove_this}"; done
> 
> Maybe this *is* a little more intuitive:
> 
> $ rename remove_this add_this $glob
> 
> Unix in general, and GNU/Linux in particular, never ceases to amaze me. I
> may not be an expert in any particular field of GNU/Linux but I'm no newbie
> either, and yet there never passes a day without me learning *something*
> new.
> 
> -- 
> G. Stewart - godwin.stewart@example.com
> 
> Shortcut, n.:
>         The longest distance between two points.



-- 
Michael(tm) Smith
http://tokyo.metblogs.com/
http://sideshowbarker.net/
http://www.oreillynet.com/pub/au/890


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links