Date: Sun, 23 Jul 2000 20:51:44 -0500 From: Dan Nelson <dnelson@emsphone.com> To: Matt Pillsbury <pillsy@brown.edu> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: There must be a better way.... Message-ID: <20000723205144.A25032@dan.emsphone.com> In-Reply-To: <20000723192635.A94476@straylight.NONE>; from "Matt Pillsbury" on Sun Jul 23 19:26:35 GMT 2000 References: <20000723192635.A94476@straylight.NONE>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Jul 23), Matt Pillsbury said: > I'm running bash, and I recently wanted to change a bunch of filenames > in a directory based on a glob: changing *.JPG to *.jpg . I knew that > > mv *.JPG *.jpg > > wouldn't cut it, but the solution I ultimately used seems really > cumbersome: > > for NAME in *.JPG; do mv $NAME `echo $NAME | sed -e 's/JPG/jpg/'`; done I really like ports/misc/mmv for things like this. It'll even warn you about name conflicts with existing files. mmv "*.JPG" "=1.jpg" -- Dan Nelson dnelson@emsphone.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000723205144.A25032>