Skip to content

Instantly share code, notes, and snippets.

@fefranca
Created April 15, 2011 14:58
Show Gist options
  • Save fefranca/921833 to your computer and use it in GitHub Desktop.
Save fefranca/921833 to your computer and use it in GitHub Desktop.
Convert all jpgs in the current directory to their own individual zips
#!/bin/sh
# Convert all jpgs in the current directory to their own individual zips
for f in `ls *.jpg`; do
z=`echo $f | grep -Eo '(.+)\.'`zip;
echo $'\e[32m' "$f -> $z" $'\e[0m'
zip $z $f
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment