7 lines
191 B
Bash
Executable file
7 lines
191 B
Bash
Executable file
#!/bin/bash
|
|
|
|
for filename in *.pdf; do
|
|
target=$(echo ${filename} | sed 's/^\(\([0-9]\{4\}\)\([0-9]\{2\}\).*\)$/\2\/\3\/\1/')
|
|
mkdir -p $(dirname ${target})
|
|
mv ${filename} ${target}
|
|
done
|