[GRASSLIST:4181] Re: redirecting v.what results to file using batch-grass

Glynn Clements glynn.clements at virgin.net
Wed Jul 31 01:22:43 EDT 2002


Andrew wrote:

> I've managed to get the v.what command to redirect it's results to file
> (using >) but I'm having some problems doing this when using
> batch-grass.sh.  I always get the same error message:
> 
> Sorry <>> is not a valid option
> Sorry <v.whatoutput> is not a valid option
> 
> and I get the same if using | instead of > (1st error message obviously
> changes the invalid sign)
> 
> My full batch-grass line is (in Pascal)
> 
> Exec('batch-grass.sh stellenbosch andrew v.what map=stbstreets_wgs84
> east_north=18.830,-33.935 > v.whatoutput','');

and:

> Sorry, I forgot to specify that the result is redirected to file if
> batch-grass.sh is run on the command line, but I get the errors when
> batch-grass is run from another programme (Pascal).
> By the way, batch-grass works fine using Exec in Pascal, the errors are
> generated when I try redirect the result to file using batch-grass.

This appears to be an issue with the way that the Exec() function
works.

The redirection operators are implemented by the shell. Presumably
Exec() doesn't use the shell, in which case you won't be able to use
any shell constructs in the command.

-- 
Glynn Clements <glynn.clements at virgin.net>



More information about the grass-user mailing list