begin  quoting John H. Robinson, IV as of Sat, Dec 30, 2006 at 12:06:35AM -0800:
> Stewart Stremler wrote:
[snip]
> > Surely you'd want to exit with 0 or 1, depending on a match
> > or not, so that you can more easily use your script in another,
> > yes?
> 
> If I were to exit with a 1 upon failure, I would also dispense with the
> printing of No match. When I wrote this, I was using hte input and
> output as given to me on the spec sheet (the currently working program).

Ah, good point.

There's many a rewrite that would have been better off had your sensible
sensibilties been applied; back when I was quite damp in the auricular
regions, I watched a skilled programmer reimplement a million-line 
billing system while adding New Features. The Boss was Not Happy that
the new program introduced All! New! Bugs! instead of doing *exactly*
what the old program did (hundreds of thousands of lines of COBOL,
IIRC).

> If I had my druthers, I would do the silent failure with an exit code of
> non-zero (probably 1, unless I had a good reason otherwise).

Heh. Given my druthers, I'd add a -v(erbose) option, to print output as
well, and a -h(elp) option, to print out usage information -- but I'm
often too lazy to do so the first time around.

-- 
_ |\_
 \|

-- 
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to