Add piscal manager scripts

This commit is contained in:
2022-09-19 11:48:27 -04:00
parent ad2ee8a4ae
commit 04f31fe6a4
7 changed files with 409 additions and 0 deletions
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
for file in *; do
## Skip unless this is a file
if [ -f "$file" ]; then
## get the first four characters from filename, aka the year
target="${file:0:4}"
## Create the target directory if it doesn't exist
[ -d "$target" ] || mkdir "$target" 2>/dev/null
## Move the current file
mv "$file" "$target" 2>/dev/null
fi
done