Skip to content

Instantly share code, notes, and snippets.

@jcordeiro
Created April 10, 2015 21:44
Show Gist options
  • Save jcordeiro/ddaa881c6a5dc0c1fc39 to your computer and use it in GitHub Desktop.
Save jcordeiro/ddaa881c6a5dc0c1fc39 to your computer and use it in GitHub Desktop.
Iterates through a directory of .svg images and converts them to .png images. Requires the inkscape command line tool to be installed.
#!/bin/sh
for i in *.svg
do
IFS='.' read -a array <<< "$i"
inkscape -f "$i" -e "${array[0]}.png"
rm $i
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment