[GRASS-dev] Return value from g.copy is one when --overwrite - bug or feature?
Rainer M Krug
Rainer at krugs.de
Fri Nov 6 05:21:24 PST 2015
When copying via g.copy and specifying --overwrite and the target object
already exists, the return value is 1 but no error message is returned:
,----
| simASM:grassAnalysis> g.copy --overwrite region=region1,region2
| simASM:grassAnalysis> echo $?
| 1
| simASM:grassAnalysis> g.version
| GRASS 7.0.1 (2015)
| simASM:grassAnalysis>
`----
From http://tldp.org/LDP/abs/html/exit-status.html:
,----
| A successful command returns a 0, while an unsuccessful one returns a
| non-zero value that usually can be interpreted as an error code.
`----
So shouldn't the return value be 0 in this case, as the command did what
it was told?
Cheers,
Rainer
--
Rainer M. Krug, PhD (Conservation Ecology, SUN), MSc (Conservation Biology, UCT), Dipl. Phys. (Germany)
Centre of Excellence for Invasion Biology
Stellenbosch University
South Africa
Tel : +33 - (0)9 53 10 27 44
Cell: +33 - (0)6 85 62 59 98
Fax : +33 - (0)9 58 10 27 44
Fax (D): +49 - (0)3 21 21 25 22 44
email: Rainer at krugs.de
Skype: RMkrug
PGP: 0x0F52F982
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 454 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20151106/7ecc5ea4/attachment.sig>
More information about the grass-dev
mailing list