On Wed, Jun 27, 2007 at 09:52:29AM -0700, Marco S Hyman wrote:
> > for FILE in *jpg; do
> > NEW=$(echo $FILE | sed -e 's/\.jpg$/_thumb.jpg/')
> > mv "${FILE}" "${NEW}"
> > done
> There is no need for echo and sed. OpenBSD sh and ksh support
> ${var%suffix} which evaluates to the contents of var less the suffix.
For completeness' sake: so does bash, apparently.
Cheerio,
Thomas
--
-----------------------------------------------------------------------------
Thomas Ribbrock http://www.ribbrock.org ICQ#: 15839919
"You have to live on the edge of reality - to make your dreams come true!"