Forums » Linux
I tested this script before I deleted all the files. It would have been safer if I'd saved a list of the number of files before the convert, saved that number, added the number of jpg files that that number and only rm -rf 'd if the answer was 0.
uhh why not just check for convert's exit code and see if its 0?
Because convert might have exitted with 0 I guess that could work... I never actually looked to see what its return codes are. Some people are weird and don't return 0.
well 0 is the standard for successful exit, and convert is part of a bigass library, so I imagine it behaves properly.