Skip to content

Instantly share code, notes, and snippets.

@noyuno
Last active March 15, 2019 10:45
Show Gist options
  • Save noyuno/c7cb83ea3d9978b331fea44a4406c598 to your computer and use it in GitHub Desktop.
Save noyuno/c7cb83ea3d9978b331fea44a4406c598 to your computer and use it in GitHub Desktop.
seq 2000 2019 | while read y ; do
[ "$y" = "" ] && break
rm -rf n$y
mkdir -p n$y
find . -type f |grep --color=no ./$y | while read i; do
a=$(dirname "$i")
a=$(basename "$a")-$(basename "$i")
cp -f "$i" "n$y/$a"
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment