Remove query string from filename after wget

After using wget to fetch multiple files, you end up with any query strings as part of the filename, remove them:

for file in *.js\?*; do mv "$file" "${file%%\?*}"; done

Leave a Reply

Your email address will not be published. Required fields are marked *