Last active
July 7, 2017 09:22
-
-
Save rohitpaulk/f0eedc4b450d3876b5a8bb7e4a1b89aa to your computer and use it in GitHub Desktop.
Strip Query parameters from wget --page-requisites output
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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