Are the exit values for gm documented somewhere ? Can we assume 0 for success, and non-zero for complete failure, or are there more details to read from these ?
A properly behaving GM will return zero on success and will usually return 1 (but always non-zero) if there is a failure. Returning zero on success is a standard Unix/POSIX convention. Regardless, if there is a particular error circumstance you really really care about, it is wise to test it in order to make sure that the error is reported appropriately.
freddy:~% gm convert foo bar; echo $?
gm convert: Unable to open file (foo) .
freddy:~% gm convert logo: null:; echo $?
Log in to post a comment.