> Style question - aren't unix command line programs supposed to use
> parameters, rather than interactive prompting?  and to read from stdin
> if no filename is supplied?

No, they can do whatever they want. For example, mutt and pine are
email clients which are interactive, and only use a text terminal. Most
commonly these programs are made by linking with the ncurses library,
which frees the programmer from the impossible task of making sure
something works with every terminal out there. Many other programs have
simple user-interaction as well - fsck for example. Often there's an
option which tells the program to never be interactive.

If however you're trying to make a part for the kitset/toolbox, the
following rules apply:

* error output goes to stderr, so it doesn't end up with the data
* input/output can come from/to stdin/stdout, or file(s)
* the only way to give parameters to the program (e.g. to control/modify
  its behaviour) is via command line arguments
* in some cases, environment variables can be used instead of command
  line arguments (e.g. language settings which should affect all bits in
  the kitset)
* on exit, success is 0, and anything !=0 is an error code.

These rules ensure that the program can easily be combined with the
other bits already in the box.

There are also general guidelines on the use of command line arguments
by GNU programs, it is a good idea to at least try to follow them,
otherwise we end up with every program having its own obnoxious way -
as a prime example for this, see cdrecord.

Volker

-- 
Volker Kuhlmann                 is possibly list0570 with the domain in header
http://volker.dnsalias.net/             Please do not CC list postings to me.

Reply via email to