Forums » Linux

For you Linux ppl who doesn't want to open every image to convert

«12
Oct 01, 2003 roguelazer link
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.
Oct 01, 2003 romikq link
uhh why not just check for convert's exit code and see if its 0?
Oct 01, 2003 roguelazer link
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.
Oct 01, 2003 romikq link
well 0 is the standard for successful exit, and convert is part of a bigass library, so I imagine it behaves properly.