Skip to content

Instantly share code, notes, and snippets.

@trevor-vaughan
Created January 9, 2015 20:03
Show Gist options
  • Save trevor-vaughan/fb5e2e8f8219810664bb to your computer and use it in GitHub Desktop.
Save trevor-vaughan/fb5e2e8f8219810664bb to your computer and use it in GitHub Desktop.
Rename RPMs downloaded from Red Hat
ruby -r fileutils -e 'Dir.glob("*rpm?*").each do |file| file =~ /(.*)rpm\?.*/; FileUtils.mv(file,"#{$1}rpm") end'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment