[GRASS-dev] [GRASS GIS] #2509: d.mon output overwrite
GRASS GIS
trac at osgeo.org
Wed Feb 4 05:55:21 PST 2015
#2509: d.mon output overwrite
-------------------------+--------------------------------------------------
Reporter: martinl | Owner: martinl
Type: defect | Status: assigned
Priority: normal | Milestone: 7.0.0
Component: Display | Version: unspecified
Keywords: d.mon | Platform: Unspecified
Cpu: Unspecified |
-------------------------+--------------------------------------------------
Comment(by glynn):
Replying to [comment:26 wenzeslaus]:
> Passing commands as one string is probably necessary in some cases (e.g.
when they are stored into a file or when a module would take more
different commands as input) but if it can be avoided, it should be
avoided I think.
When a d.* command is redirected to another program, its argument list
needs to be passed as-is.
If you need to store a "command" in a file, then you need to separate the
arguments. There are two options here:
1. Use a NUL byte as the argument separator. On both Unix and Windows,
any byte except NUL can occur within an argument. NUL cannot occur within
an argument, but can occur within a file. However, if the command is only
one item within the file, then you also need some mechanism to indicate
the end of the command, which leaves the second option:
2. Use some other byte as the separator and escape or quote argument
values so that occurrences of the separator within an argument can be
distinguished from argument separators.
Ignoring the situation where the separator (or a character used for
escaping or quoting) occurs within an argument is not a "solution". Which
is why G_recreate_command() can't be used here.
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/2509#comment:29>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list