Created
February 21, 2015 04:52
-
-
Save dbernheisel/2523aa5451e6eb1dbc9c to your computer and use it in GitHub Desktop.
Separate files into new folders by ISBN13 (no dashes)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #/bin/bash | |
| # Separate ISBNs to folders named by ISBN | |
| for f in 978*.*; do | |
| isbn=${f:0:13} | |
| if [ ! -d $isbn ]; then | |
| echo Creating folder for $isbn | |
| mkdir $isbn | |
| fi | |
| mv -v $f $isbn | |
| done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment