Add piscal manager scripts
This commit is contained in:
Executable
+14
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user