Single line scripts

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.

One Response to “Single line scripts”

  1. Ravi Teja G

    Really nice ones!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.