Skip to content

Instantly share code, notes, and snippets.

@rohitpaulk
Last active July 7, 2017 09:22
Show Gist options
  • Select an option

  • Save rohitpaulk/f0eedc4b450d3876b5a8bb7e4a1b89aa to your computer and use it in GitHub Desktop.

Select an option

Save rohitpaulk/f0eedc4b450d3876b5a8bb7e4a1b89aa to your computer and use it in GitHub Desktop.
Strip Query parameters from wget --page-requisites output
Dir.glob("**/*").each do |filename|
next unless filename.include?("?")
new_filename = filename.split("?").first
puts "Renaming #{filename} to #{new_filename}"
File.rename(filename, new_filename)
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment