DZone Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world

Snippets has posted 5883 posts at DZone. View Full User Profile

Ruby To Convert All Files In Dir (that End In [0-9].jpg) From Jpg To Pbm

  • submit to reddit
        // Ruby to convert all files in dir (that end in [0-9].jpg) from jpg to pbm'.').each { |f| `convert #{f} #{f[0..-5]}.pbm` if f =~ /[\d].jpg$/ }