Guest User

Untitled

a guest
Dec 13th, 2017
64
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. #!/bin/sh
  2.  
  3. CATEGORIES=(desporto economia)
  4.  
  5. mkdir -p dev train 'eval'
  6.  
  7. for c in "${CATEGORIES[@]}"; do
  8. for i in $(find ./_/$c -type f | sort -R | head); do
  9. j=$(basename $i)
  10. mv $i dev/${c}_${j}
  11. done
  12. done
  13.  
  14. for c in "${CATEGORIES[@]}"; do
  15. for i in $(find ./_/$c -type f | sort -R | head -n 2000); do
  16. j=$(basename $i)
  17. mv $i train/${c}_${j}
  18. done
  19. done
  20.  
  21. for c in "${CATEGORIES[@]}"; do
  22. for i in $(find ./_/$c -type f | sort -R | head -n 700); do
  23. j=$(basename $i)
  24. mv $i 'eval'/${c}_${j}
  25. done
  26. done
Add Comment
Please, Sign In to add comment