Je ne suis pas du genre à abandonner, alors j'ai ré-essayé.
Ça passe en 2 passes.
Ci-dessous, les logs
Tâche : V5_Xfer_Photo_AAAA_MM
Heure de début : Sun, 12 Feb 2023 20:43:39 GMT
Heure d'arrêt : Sun, 12 Feb 2023 20:43:40 GMT
État actuel : 2 (Interrompu)
Sortie/erreur standard :
mv 2023 02 04 Enduro JEF svg.jpg ../2023/02,rc=0
[ -d ../2023/01 ]||(mkdir -p ../2023/01;echo Creation 2023/01,rc=0)
mv DJI_0018 Dattiers svg.JPG ../2023/01
echo mv DJI_0018 Dattiers svg.JPG ../2023/01,rc=0
sh: line 9: unexpected EOF while looking for matching `"'
sh: line 10: syntax error: unexpected end of file
Tâche : V5_Xfer_Photo_AAAA_MM
Heure de début : Sun, 12 Feb 2023 20:44:06 GMT
Heure d'arrêt : Sun, 12 Feb 2023 20:44:07 GMT
État actuel : 2 (Interrompu)
Sortie/erreur standard :
sh: line 3: unexpected EOF while looking for matching `"'
sh: line 4: syntax error: unexpected end of file
avec :
Ça passe en 2 passes.
Ci-dessous, les logs
Tâche : V5_Xfer_Photo_AAAA_MM
Heure de début : Sun, 12 Feb 2023 20:43:39 GMT
Heure d'arrêt : Sun, 12 Feb 2023 20:43:40 GMT
État actuel : 2 (Interrompu)
Sortie/erreur standard :
mv 2023 02 04 Enduro JEF svg.jpg ../2023/02,rc=0
[ -d ../2023/01 ]||(mkdir -p ../2023/01;echo Creation 2023/01,rc=0)
mv DJI_0018 Dattiers svg.JPG ../2023/01
echo mv DJI_0018 Dattiers svg.JPG ../2023/01,rc=0
sh: line 9: unexpected EOF while looking for matching `"'
sh: line 10: syntax error: unexpected end of file
Tâche : V5_Xfer_Photo_AAAA_MM
Heure de début : Sun, 12 Feb 2023 20:44:06 GMT
Heure d'arrêt : Sun, 12 Feb 2023 20:44:07 GMT
État actuel : 2 (Interrompu)
Sortie/erreur standard :
sh: line 3: unexpected EOF while looking for matching `"'
sh: line 4: syntax error: unexpected end of file
avec :
Code:
cd /volume1/photo/A_classer || exit 8
ls --full-time| awk '
/^\-/ {
split($6,a,"-")
fic=""
for (i=9;i<=NF;i++) {
fic=(fic " " $i)
}
print "[ -d ../" a[1] "/" a[2] " ]||(mkdir -p ../" a[1] "/" a[2] ";echo \"Creation " a[1] "/" a[2] ",rc=$?\")"
print "mv \"" substr(fic,2) "\" ../" a[1] "/" a[2]
print "echo \"mv " substr(fic,2) "\" ../" a[1] "/" a[2] ",rc=$?\""
} ' |sh