[GRASS-user] how to supress warnings ???

Dear all,

I am using some functions in a loop and would like to suppress warnings such as:

WARNING: Vector map <essaisV> already exists and will be overwritten

In this case the call that trigger the warning is:

v.extract -t in=$vector out=essaisV list=$count type=point --o --q # point extraction

Is there a way to do it ?

Patrick

Hi,

2008/1/27, Patrick Giraudoux <patrick.giraudoux@univ-fcomte.fr>:

I am using some functions in a loop and would like to suppress warnings
such as:

WARNING: Vector map <essaisV> already exists and will be overwritten

In this case the call that trigger the warning is:

v.extract -t in=$vector out=essaisV list=$count type=point --o --q #
point extraction

redirect stderr to /dev/null, e.g.

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 2>/dev/null

Regards, Martin

--
Martin Landa <landa.martin@gmail.com> * http://gama.fsv.cvut.cz/~landa *

Martin Landa a écrit :

Hi,

2008/1/27, Patrick Giraudoux [<patrick.giraudoux@univ-fcomte.fr>](mailto:patrick.giraudoux@univ-fcomte.fr):
  
I am using some functions in a loop and would like to suppress warnings
such as:

WARNING: Vector map <essaisV> already exists and will be overwritten

In this case the call that trigger the warning is:

 v.extract -t in=$vector out=essaisV list=$count type=point --o --q #
point extraction
    

redirect stderr to /dev/null, e.g.

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 2>/dev/null

Regards, Martin

  

When I do this in the script:

v.extract -t in=$vector out=essaisV list=$count type=point --o --q 2>/dev/null# point extraction

executing the programme, I get:

/home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#: Permission denied

Cheers,

Patrick

On Jan 27, 2008 2:19 PM, Patrick Giraudoux
<patrick.giraudoux@univ-fcomte.fr> wrote:
...

When I do this in the script:

  v.extract -t in=$vector out=essaisV list=$count type=point --o --q
2>/dev/null# point extraction

executing the programme, I get:

/home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#:
Permission denied

Try to change
... /dev/null#point extraction
to
... /dev/null #point extraction

White space is needed here.

Markus

Markus Neteler a écrit :

...
  
 When I do this in the script:

  v.extract -t in=$vector out=essaisV list=$count type=point --o --q
2>/dev/null# point extraction

 executing the programme, I get:

 /home/giraudoux/grassprog/r.what.vbuff: 157: cannot create /dev/null#:
Permission denied
    

Try to change
... /dev/null#point extraction
to
... /dev/null #point extraction

White space is needed here.

Markus

  

Works fantastic ! Thanks…

Patrick