Skip to content

Instantly share code, notes, and snippets.

@skurscheid
Created July 7, 2016 04:43
Show Gist options
  • Save skurscheid/af5aeb027cb9e601bf1e579ded16d598 to your computer and use it in GitHub Desktop.
Save skurscheid/af5aeb027cb9e601bf1e579ded16d598 to your computer and use it in GitHub Desktop.
use part of file name to make subdirectories
for i in $(ls *.gz| cut -f 1,2 -d "_"| sort | uniq); do mkdir $i; mv ${i}*.gz $i; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment