Re: Smart version of mv ?
From: Adam Funk (a24061_at_yahoo.com)
Date: 08/08/05
- Previous message: Martin Wheeler: "Re: (re-)boot woes"
- In reply to: Paolo Pantaleo: "Smart version of mv ?"
- Next in thread: Gregory Seidman: "Re: Smart version of mv ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 08 Aug 2005 12:15:00 +0100 To: debian-user@lists.debian.org
Paolo Pantaleo wrote:
> with MSDOS mv (or move, i don't remember the name) you can do
> mv *.c *.cpp
> that is a quite smart thing, i think :)
>
> with Unix mv... you can't. You have to use find and sed (at least so i
> know)
>
> Is there a nice program that can do things like:
> TheSmartMove "*.c" "*.cpp"
The perl package includes the rename command, which will do what you want
$ rename s/\.c$/\.cpp/ *.c
and much more complicated things.
You can also test a substitution first with the -v -n options.
-- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
- Previous message: Martin Wheeler: "Re: (re-)boot woes"
- In reply to: Paolo Pantaleo: "Smart version of mv ?"
- Next in thread: Gregory Seidman: "Re: Smart version of mv ?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]