Last active
April 9, 2017 15:18
-
-
Save blahah/908dc28d52a3b064a17c599ae31da321 to your computer and use it in GitHub Desktop.
move elife json into nested directories based on ID
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
for json in $(ls *.json); do | |
splitdir=$(echo $json | sed -e 's/elife-\([0-9]\{5\}\)-v[0-9]\.json/\1/' -e 's/\(.\)/\1\//g') | |
echo moving $json to $splitdir | |
mkdir -p $splitdir | |
mv $json $splitdir/ | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment