[GRASS-dev] SUBMITTING_SCRIPTS and SUBIMITTING_TCLTK patches

Hamish hamish_nospam at yahoo.com
Mon Jun 26 03:15:07 EDT 2006


Maciek Sieczka wrote:
> +++ SUBMITTING_SCRIPTS
..
> +7.  See what input/output variants and options are available for you to
> +    use in your script at
> +    http://mpa.itc.it/markus/grass61progman/parser_8c-source.html#l00326

perhaps a more permanent or relative location could be pointed to?
e.g. see G_define_standard_option() in lib/gis/parser.c?

> +12. Send solely informational output to stderr, not stdout, e.g.:
> +
> +    echo "Done." 1>&2
> +
> +13. In order to prevent your script from being too verbose, redirect command's
> +    output to /dev/null, e.g.:
> +
> +    g.remove vect="${OUTPUT}_temp" > /dev/null
> +    
> +    The command's output will be filtered letting only warnings and errors get
> +    through.


I think the wording of this could be improved.

12. Send output containing status information to stderr, not stdout. stdout
    is reserved for parsable output. e.g.:

    echo "$PROG complete." 1>&2


13. Consider redirecting irrelevant stdout of "noisy" modules used in your
    script to /dev/null. e.g.:

    g.remove rast="${tmp}_${PROG}_$$" > /dev/null

    Modules should be sending all error and warning messages to stderr,
    so important messages will not be hidden by the muting of stdout.



> 14. 

fix whitespace, make reasons for using WIND_OVERRIDE more clear.
Is WIND_OVERRIDE even worthy of mention here?




thanks,
Hamish




More information about the grass-dev mailing list