Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. find . -type f -iname '*.Gbx' -print0 |
  2. while IFS= read -r -d $'\0' file; do
  3. title=$(grep -aPo 'title="(.*?)"' "$file" | sed -r 's/.*?="(.*)"/\1/g')
  4. titledir="repack/$title"
  5. if [ ! -d $titledir ]; then
  6. mkdir -vp $titledir
  7. fi
  8. filename=$(basename "$file")
  9. cp -v "$file" "$titledir/$filename"
  10. done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement