[Koha-devel] Coding guidelines for command-line scripts

Mark Tompsett mtompset at hotmail.com
Wed Aug 29 17:15:44 CEST 2012


Greetings,

> Command-line scripts should return an exit code of 0 on success and not-0 
> on failure.

This is generally the case and a good rule of thumb, which I support, but
there may be cases of exceptions.

GREP
0: Found
1: Not Found
2: Error
If for some reason the script is grep-like in nature (I'm being 
hypothetical), then it should return like grep.

Generally, scripts won't be, so:
+1 for 0=success and not-0=failure.

GPML,
Mark Tompsett 



More information about the Koha-devel mailing list