Single line scripts

Posted On Monday, September 8th, 2008

Comments Dropped leave a response

This page contains snippets of code in different languages. These one-liners are too small for a post, but are still very important to keep.

Thumbnail Images

# Convert all jpgs in the current directory into smaller ones:
for i in *.jpg; do echo $i; convert $i -geometry 500x500 small_$i; done;
# Same as above, but will handle names with spaces
for i in *.jpg; do echo $i; convert "$i" -geometry 800x800 "small/$i"; done;

Leave a response and help improve reader response. All your responses matter, so say whatever you want. But please refrain from spamming and shameless plugs, as well as excessive use of vulgar language.

Respond now.