Re: OT: Wildcard renaming of files

2000-11-12 Thread Colin Watson
[EMAIL PROTECTED] wrote: >Martin Fluch wrote: >> A little bit bash programming... >> >> for $i in *.html ; do mv "$i" "${i:0:${#tmp}-1}" ; done >> >> Yes, I know, that this is quite cryptic ... but unfortunately I'm to tired >> to explain it ... I've need some sleep :-) >> >> Nevertheless it sho

Re: [debian-user] OT: Wildcard renaming of files

2000-11-12 Thread Bernie Boudet
On 12-Nov-00 22:25 Colin Watson wrote: > >> for $i in *.html ; do mv "$i" "${i:0:${#tmp}-1}" ; done > > > >for $f in *.html; do mv $f ${f/.html/.htm}; done > That's what the % flag solves (match only at the end), when put > immediately after the first / (so ${f/%.html/.htm}). The # flag does the

Re: OT: Wildcard renaming of files

2000-11-12 Thread csj
Michael Abraham Shulman wrote: > "csj" == csj <[EMAIL PROTECTED]> writes: > > csj> I have a bunch of files I want to rename from .html to .htm. Is > csj> there I way to rename them all at once? > > $ mmv '*.html' '#1.htm' Thanks to everybody that replied. I settled for the program "mmv." It's r

Re: [debian-user] OT: Wildcard renaming of files

2000-11-12 Thread Colin Watson
=?iso-8859-1?Q?R=FCdiger_Kuhlmann?= <[EMAIL PROTECTED]> wrote: >--[Martin Fluch]--<[EMAIL PROTECTED]> >> A little bit bash programming... >> for $i in *.html ; do mv "$i" "${i:0:${#tmp}-1}" ; done > >for $f in *.html; do mv $f ${f/.html/.htm}; done > >Requires a not too old bash. Beware of file nam

Re: OT: Wildcard renaming of files

2000-11-12 Thread brian moore
On Sat, Nov 11, 2000 at 05:18:19AM +0800, [EMAIL PROTECTED] wrote: > I have a bunch of files I want to rename from .html to .htm. Is there I way to > rename them all at once? > > I remember from my DOS days a command like "ren" (or is it "rename"?) that > would do the trick. Something like: > > r

Re: [debian-user] OT: Wildcard renaming of files

2000-11-12 Thread Rüdiger Kuhlmann
Hi! >--[Martin Fluch]--<[EMAIL PROTECTED]> > A little bit bash programming... > for $i in *.html ; do mv "$i" "${i:0:${#tmp}-1}" ; done for $f in *.html; do mv $f ${f/.html/.htm}; done Requires a not too old bash. Beware of file names containing .html elsewhere than at the end... Yours, Rüdige

Re: OT: Wildcard renaming of files

2000-11-10 Thread Colin Watson
Martin Fluch <[EMAIL PROTECTED]> wrote: >On Sat, 11 Nov 2000 [EMAIL PROTECTED] wrote: >> I have a bunch of files I want to rename from .html to .htm. Is there >> I way to rename them all at once? > >A little bit bash programming... > >for $i in *.html ; do mv "$i" "${i:0:${#tmp}-1}" ; done > >Yes,

Re: OT: Wildcard renaming of files

2000-11-10 Thread Colin Watson
[EMAIL PROTECTED] wrote: >I have a bunch of files I want to rename from .html to .htm. Is there I way to >rename them all at once? > >I remember from my DOS days a command like "ren" (or is it "rename"?) that >would do the trick. Something like: > >ren *.html *.htm Somebody's already mentioned mmv

Re: OT: Wildcard renaming of files

2000-11-10 Thread Michael Abraham Shulman
"csj" == csj <[EMAIL PROTECTED]> writes: csj> I have a bunch of files I want to rename from .html to .htm. Is csj> there I way to rename them all at once? $ mmv '*.html' '#1.htm' See mmv(1) for more info. The quotes are necessary, because you want `mmv' to do the wildcard expansion instead of

Re: OT: Wildcard renaming of files

2000-11-10 Thread Martin Fluch
On Sat, 11 Nov 2000 [EMAIL PROTECTED] wrote: > I have a bunch of files I want to rename from .html to .htm. Is there > I way to rename them all at once? > > I remember from my DOS days a command like "ren" (or is it "rename"?) > that would do the trick. Something like: > > ren *.html *.htm > >

OT: Wildcard renaming of files

2000-11-10 Thread csj
I have a bunch of files I want to rename from .html to .htm. Is there I way to rename them all at once? I remember from my DOS days a command like "ren" (or is it "rename"?) that would do the trick. Something like: ren *.html *.htm What's the Linux equivalent of this trick? mv only renames files