Step1: First, update urls.sql.rb based on how many multisites you have. This generates a SQL to execute on your database. pbcopy copies the generated sql from terminal on mac.
ruby urls.sql.rb | pbcopy
Step2: Execute the sql on phpmyadmin or mysql command line, download or save ther result as urls.txt.
Then run ruby all_files.rb which generates the urls.txt. The reason we need all_files.rb is because it finds the variants of images, eg: for image.jpeg, the sql has image-150x150.jpeg, image-320x320.jpeg, etc which are individually printed in each line by the all_files.rb.