[GRASS-dev] Re: [GRASS GIS] #81: scripts: "echo -n" not portable
GRASS GIS
trac at osgeo.org
Wed Mar 5 23:50:46 EST 2008
#81: scripts: "echo -n" not portable
----------------------+-----------------------------------------------------
Reporter: hamish | Owner: hamish
Type: defect | Status: assigned
Priority: blocker | Milestone: 6.3.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
----------------------+-----------------------------------------------------
Comment (by hamish):
d.vect.thematic and i.in.spotvgt are updated in SVN/trunk, if someone who
uses those could test please? then we can backport for 6.3.0.
I am not sure about r.tileset:
{{{
Index: r.tileset/r.tileset
===================================================================
--- r.tileset/r.tileset (revision 30465)
+++ r.tileset/r.tileset (working copy)
@@ -189,15 +189,11 @@
Lookup_Mac() {
# Assignment Command Statement Builder
+# $1 is Source name
+# $3 is Destination name
- echo -n 'eval '
- echo -n "$3" # Destination name
- echo -n '=${'
- echo -n "$1" # Source name
- echo -n "[$2]}"
+ echo "eval $3=${$1[$2]}"
-# That could all be a single command.
-# Matter of style only.
}
# Lookup_Mac
}}}
?will that work?
newline suppression via printf shouldn't be needed....
Hamish
--
Ticket URL: <http://trac.osgeo.org/grass/ticket/81#comment:3>
GRASS GIS <http://grass.osgeo.org>
GRASS Geographic Information System (GRASS GIS) - http://grass.osgeo.org/
More information about the grass-dev
mailing list