1g.message(1)                  Grass User's Manual                 g.message(1)
2
3
4

NAME

6       g.message  - Prints a message, warning, or fatal error the GRASS way.
7       This module should be used in scripts for messages served to user.
8

KEYWORDS

10       general
11

SYNOPSIS

13       g.message
14       g.message help
15       g.message   [-wediv]   message=string    [debug=integer]    [--verbose]
16       [--quiet]
17
18   Flags:
19       -w
20           Print message as GRASS warning
21
22       -e
23           Print message as GRASS fatal error
24
25       -d
26           Print message as GRASS debug message
27
28       -i
29           Print message in all but full quiet mode
30
31       -v
32           Print message only if in verbose mode
33
34       --verbose
35           Verbose module output
36
37       --quiet
38           Quiet module output
39
40   Parameters:
41       message=string
42           Text of the message to be printed
43
44       debug=integer
45           Level to use for debug messages
46           Options: 0-5
47           Default: 1
48

DESCRIPTION

50       This program is to be used in shell/perl/python scripts, so the  author
51       does  not  need  to use the echo program. The advantage of g.message is
52       that it formats messages just like other GRASS modules do and that  its
53       functionality is influenced by the GRASS_VERBOSE and GRASS_MESSAGE_FOR‐
54       MAT environment variables.
55
56       The program can be used for standard informative messages  as  well  as
57       warnings  (-w flag) and fatal errors (-e flag). For debugging purposes,
58       the -d flag will cause g.message to print a debugging  message  at  the
59       given level.
60

NOTES

62       Messages containing "=" must use the full message= syntax so the parser
63       doesn't get confused.
64
65       Messges containing '!' and  '$'  must  use  single  'quotes'  to  avoid
66       unwanted shell translation.
67
68       If  you  want  a long message (mutli-line) to be dealt with as a single
69       paragraph, use a single call to g.message with text split in the script
70       using  the  backslash  as  the  last character. (In shell scripts don't
71       close the "quote")
72
73       A blank line may be obtained with: g.message ""
74
75       Redundant whitespace will be stripped away.
76
77   VERBOSITY LEVELS
78       Controlled by the "GRASS_VERBOSE" environment variable. Typically  this
79       is set using the --quiet or --verbose command line options.
80
81                     0 - only errors and warnings are printed
82
83                     1 - progress messages are printed
84
85                     2 - all module messages are printed
86
87                     3 - additional verbose messages are printed
88
89   DEBUG LEVELS
90       Controlled by the "DEBUG" GRASS gisenv variable. (set with g.gisenv)
91       Recommended levels:
92
93                     1 - message is printed once or few times per module
94
95                     3 - each row (raster) or line (vector)
96
97                     5 - each cell (raster) or point (vector)
98

SEE ALSO

100        GRASS variables and environment variables,
101       g.gisenv, g.parser
102

AUTHOR

104       Jachym Cepicky
105
106       Last changed: $Date: 2007-05-30 05:42:20 +0200 (Wed, 30 May 2007) $
107
108       Full index
109
110       © 2003-2008 GRASS Development Team
111
112
113
114GRASS 6.3.0                                                       g.message(1)
Impressum