ref: 2fa650c0e4cbbf0777eb10d91c0f4018cada9bb1
dir: /sdrip/archive.rc/
#!/bin/rc ls *.JPG *.HEIC | awk -F_ '{ year=substr($1, 1, 4) month=substr($1, 5, 2) dirs[sprintf("%s/%s", year, month)] = 1 printf "mv -n %s /home/alex/img/%s/%s/%s\n", $0, year, month, $0 } END{ for(d in dirs) printf "mkdir -p /home/alex/img/%s\n", d }' | tac