[GRASS-dev] Re: [bug #4524] (grass) v.clean, v.patch (else?): output to stderr instead of stdout...

Hamish hamish_nospam at yahoo.com
Fri Jul 14 23:37:38 EDT 2006


> > The question might be reduced to "where to send G_message()?" ?
> 
> Anywhere but stdout, I think.
> 
> Example reason: I don't want somebody using my v.flip (a script that
> calls v.patch, among the others) to be confused with v.patch
> information that:
> 
> # Intersections at borders will have to be snapped.
> # Lines common between files will have to be edited.
> # The header information also may have to be edited.
> 
> Because I have taken care of this for the user, knowing what the input
> for v.patch is and using 'v.clean tool=snap' as needed. That
> information above is simply wrong and confusing the user, when v.patch
> is a script component.

No a general solution, but for your script perhaps you could use
"grep -v" or sed to filter out the unwanted messages (after redirecting
stderr to stdout as needed)?


Hamish




More information about the grass-dev mailing list