May
05

Can't Seem to Remember

Published: Friday, May 05, 2006, at 11:31AM

I always forget how to rename a bunch of files at once, and I always end up having to ask pcg. This time I'm recording it so I remember next time. :

for i in *.jpg ; do j=`basename $i .jpg` ; mv $i $j.gif ; done

Or:

j=`echo $i | sed 's/.jpg/.gif'` ; mv $i $j ; done

Now I know where to look next time I forget.

Comments

No comments yet.

Your Comment:

YOUR INFORMATION:
Name:
Email:
URL:
  • Comments should be on the topic of the post or they will be removed.
  • Use the live preview below to see how your comment will look before posting.
  • Keep it civil. If you're attacking people instead of arguments, or being overly profane, expect your comment to get deleted.

FORMATTING BASICS:

eWorld uses Markdown formatting.

_Italics_
__Bold__
<http://url.to.link>
[link text](http://url)

COMMENT:

Preview

Start typing...