Hacker News .hnnew | past | comments | ask | show | jobs | submitlogin

This didn't work for me. I just changed "w" to "wb" on XP and nickb's original worked fine:

require 'open-uri'; (1..34).to_a.each{|x| open('http://www.dspguide.com/CH'+x.to_s+'.PDF'){|u| File.open("CH#{x}.PDF","wb"){|f|f.puts u.readlines}}}



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: