Skip to content

Instantly share code, notes, and snippets.

@zoqaeski
Created January 29, 2010 13:24
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save zoqaeski/289716 to your computer and use it in GitHub Desktop.
Save zoqaeski/289716 to your computer and use it in GitHub Desktop.
#!/bin/bash
# Moves images into folders based on their dimensions
cd ~/wallpapers
for image in *;
do
dims=$(feh -ls $image | cut -f3,4 --output-delimiter=x | sed 's/WIDTHxHEIGHT//')
echo $dims
mkdir $dims &> /dev/null
mv $image $dims
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment