DESCRIPTION

This program is to be used in shell/perl/python scripts, so the author does not need to use the echo program. The advantage of g.message is that it formats messages just like other GRASS modules do and that its functionality is influenced by the GRASS_VERBOSE and GRASS_MESSAGE_FORMAT environment variables.

The program can be used for standard informative messages as well as warnings (-w flag) and fatal errors (-e flag). For debugging purposes, the -d flag will cause g.message to print a debugging message at the given level.

NOTES

Messages containing "=" must use the full message= syntax so the parser doesn't get confused.

Messges containing '!' and '$' must use single 'quotes' to avoid unwanted shell translation.

If you want a long message (mutli-line) to be dealt with as a single paragraph, use a single call to g.message with text split in the script using the backslash as the last character. (In shell scripts don't close the "quote")

A blank line may be obtained with: g.message ""

Redundant whitespace will be stripped away.

VERBOSITY LEVELS

Controlled by the "GRASS_VERBOSE" environment variable. Typically this is set using the --quiet or --verbose command line options.

DEBUG LEVELS

Controlled by the "DEBUG" GRASS gisenv variable. (set with g.gisenv)
Recommended levels:

SEE ALSO

GRASS variables and environment variables,
g.gisenv, g.parser

AUTHOR

Jachym Cepicky

Last changed: $Date$