Skip to content

Instantly share code, notes, and snippets.

@paulcarroty
Created May 21, 2020 16:42
Show Gist options
  • Save paulcarroty/006ecc9d66211ddad521b599accc5f76 to your computer and use it in GitHub Desktop.
Save paulcarroty/006ecc9d66211ddad521b599accc5f76 to your computer and use it in GitHub Desktop.
clean bad filenames
#!/bin/bash
# find them all
ls destination | egrep '\[' >> to_rename
# cut [*]
while read line; do echo $line | sed -e 's/\[[^][]*\] //g' ; done < /tmp/to_rename
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment