Closed kcharter closed 4 years ago
@kcharter Okie dokie. I've added continue statement after echo "Continuing with next file ..."
@kimlew OK, I see it fixed in commit c14f9753036467c6a8b670c40acb03cea05bd340. Let me know if you'd like me to close the issue instead of you.
In the first case of
https://github.com/kimlew/bash-sort-images/blob/16847406d5bedc500235cf93c761493c8a512b7d/sort_images.sh#L70-L76
you print a message saying you are skipping to the next file, but you don't use a
continue
statement to go to the next iteration of the loop.This does funny things. I created an empty file that matches the
*.jpg
file name pattern withand because other files got moved before this one, the loop printed an error message but then moved the file to the same directory as the previous file. Here's a snippet of output: