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: [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: [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