Opened 9 years ago
Closed 6 years ago
#2872 closed defect (worksforme)
"r.info -e" output not compliant with eval
Reported by: | andbal | Owned by: | |
---|---|---|---|
Priority: | normal | Milestone: | 7.0.7 |
Component: | Shell Scripts | Version: | svn-trunk |
Keywords: | shell, r.info | Cc: | |
CPU: | x86-64 | Platform: | Linux |
Description
I've got an error using the command eval `r.info -e <map_name>`
.
This is the output:
GRASS 7.1.svn (---):~ > eval `r.info -e map=soilheatflux.dos4` bash: unexpected EOF while looking for matching `"' bash: syntax error: unexpected end of file
The error is likely to be correlated to the flags -e
because with other flag (like -r
for example), the command eval
works well.
Change History (8)
follow-up: 2 comment:1 by , 9 years ago
comment:2 by , 9 years ago
Milestone: | → 7.0.3 |
---|
Replying to andbal:
I add the output of
r.info -e
executed outsideeval
... comments="i.eb.soilheatflux albedo="albedo.dos4" ndvi="ndvi.dos4" temperature=\"toa_temp.6" netradiation="rad.M1" localutctime="overpass_utc" outpu\t="soilheatflux.dos4""
The issue is that the inner quotes " need to be escaped when fprintf'ing the comment:
https://trac.osgeo.org/grass/browser/grass/trunk/raster/r.info/main.c#L392
I suppose that there is already a function for that?
comment:5 by , 9 years ago
Milestone: | 7.0.4 → 7.0.5 |
---|
comment:6 by , 8 years ago
Milestone: | 7.0.5 → 7.0.6 |
---|
comment:7 by , 7 years ago
Milestone: | 7.0.6 → 7.0.7 |
---|
comment:8 by , 6 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Unable to reproduce with GRASS 7.6.0.
Note:
See TracTickets
for help on using tickets.
I add the output of
r.info -e
executed outsideeval
Another person suggest me that maybe is a quotes problem in the
comments
field.