Skip to content

Instantly share code, notes, and snippets.

@simonvc
Created May 27, 2015 13:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonvc/d81cf995c4c36fb1cc5d to your computer and use it in GitHub Desktop.
Save simonvc/d81cf995c4c36fb1cc5d to your computer and use it in GitHub Desktop.
Script to fix files with the query string attached.
ls *\?* | while read fn; do nfn=$(echo $fn | tr '\?' ' ' | awk '{print $1}'); cp "$fn" $nfn;done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment