avrdude-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avrdude-dev] [RFC] New usage text


From: Joerg Wunsch
Subject: Re: [avrdude-dev] [RFC] New usage text
Date: Mon, 24 Feb 2003 17:41:25 +0100
User-agent: Mutt/1.2.5i

As eric wrote:

> > But it is usually only printed out due to an error - command line
> > misuse or no arguments supplied.  I agree with Joerg that it should go
> > to stderr.

> What about avrdude -?

That'll cause a "No match" message in my shell. :-)  (I'm a tcsh user, and
tcsh complains if it cannot filename-expand * and ?.)

Anyway, it's just a forced usage error.  I often call an unknown
program with -help, in the hope that the combination of the -e, -h, -l
and -p option is an error to that program, and will throw me a usage
message. ;-)

It's common Unix style that throwing usage() is considered an error.
BSD reserves exit code 64 for it (EX_USAGE in <sysexits.h>).  No idea
why gcc prints its usage strings to stdout, but remember, GNU's Not
Unix. :-)

Even those Windows programs that have a Unix background do it that
way, btw.  Can't remember how to use netstat -r to add a new route?
Try "netstat -r foo" to get the usage message.  It doesn't fit onto
the screen, so you need more.  "netstat -r foo | more"?  Doesn't work,
the message goes to stderr. ;-) "netstat -r foo 2>&1 | more", but only
if you've got WinNT or above. :-) With Win9x and its MS-DOS
command-line interpreter, you're outta luck...

-- 
J"org Wunsch                                           Unix support engineer
address@hidden        http://www.interface-systems.de/~j/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]