Alukardd:
digital422
Код:
digital422
Код:
#!/bin/bash DIR_CAM2='/tmp/test' while read -r file name; do date=${name%%_*} hour=${name#*-}; hour=${hour%%-*} mkdir -p "$DIR_CAM2/$date/$hour" mv "$file" "$DIR_CAM2/$date/$hour/" done < <(find "$DIR_CAM2" -maxdepth 1 -type f -name '*.jpg' -printf '%p %f\n') |