From: super_banane AT yahoo DOT com Newsgroups: alt.os.zshell,comp.os.msdos.djgpp,comp.unix.msdos,comp.unix.programmer Subject: Re: Open Letter / Suggestion for shells: Need access to original command line... Date: Tue, 24 Aug 1999 11:05:07 GMT Organization: Deja.com - Share what you know. Learn what you don't. Lines: 33 Message-ID: <7ptu8v$p2k$1@nnrp1.deja.com> References: <7pn6vm$cgo$1 AT news DOT connect DOT net> <7ppi1g$hrv$1 AT wagner DOT wagner DOT home> <37C19FFD DOT 264F5D61 AT NortelNetworks DOT com> NNTP-Posting-Host: 134.171.69.199 X-Article-Creation-Date: Tue Aug 24 11:05:07 1999 GMT X-Http-User-Agent: Mozilla/4.04 [en] (X11; I; SunOS 5.5.1 sun4u) X-Http-Proxy: 1.0 x38.deja.com:80 (Squid/1.1.22) for client 134.171.69.199 X-MyDeja-Info: XMYDJUIDsuper_banane To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com In article , ken AT halcyon DOT com wrote: [...] > No need for the external program: > for name in *.jpeg; do mv "$name" "${name%.jpeg}".jpg; done > > >What I'm really looking for is a regular-expression 'mv' utility that > >would except a command-line like: > > > >mv "^\(.*\)\.jpeg" "\1.jpg" No need to learn shell specifics, try 'mexp' :-) % mexp "mv *.jpeg *.jpg" Fetch mexp from: http://s.pi1.physik.uni-stuttgart.de:80/ophoff/mexp.html Compile it with: % gcc -o mexp mexp.c ... put it in /usr/local/bin and you're done. mexp is also good for things like: % ls foo01.jpg foo02.jpg foo03.jpg % mexp "mv foo??.jpg bar??.jpg" % ls bar01.jpg bar02.jpg bar03.jpg -- Nicolas Sent via Deja.com http://www.deja.com/ Share what you know. Learn what you don't.