Date: Sun, 23 Jul 2000 19:26:35 -0400 From: Matt Pillsbury <pillsy@brown.edu> To: freebsd-questions@freebsd.org Subject: There must be a better way.... Message-ID: <20000723192635.A94476@straylight.NONE>
next in thread | raw e-mail | index | archive | help
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 There's a more elegant solution, right? Thanks, Matt -- Matt Pillsbury | (401) 351-2253 | pillsy@brown.edu | mtp@brsp.net | 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?20000723192635.A94476>