#1109: g.mlist functionality extension: return e.g. $prefix.001 to $prefix.031
out
of $prefix.365 maps
-------------------------------+--------------------------------------------
Reporter: nikos | Owner: grass-...@…
Type: enhancement | Status: new
Priority: minor | Milestone:
Component: default | Version: unspecified
Keywords: g.mlist, pattern, | Platform: Unspecified
Cpu: Unspecified |
-------------------------------+--------------------------------------------
Comment(by hamish):
try adding `seq` into your script. It's a really handy little command.
{{{
MAPS=""
for i in `seq 32 59` ; do
i_str=`echo $i | awk '{printf("%03d", $1)}'`
if [ -n "$MAPS" ] ; then
MAPS="$MAPS,radmap.$i_str"
else
MAPS="radmap.$i_str"
fi
done
}}}
you can add another loop around that with expr and "31 28 31..." to
automatically set the $BEGIN and $END values for seq.
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1109#comment:1>
GRASS GIS <http://grass.osgeo.org>
_______________________________________________
grass-dev mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-dev