Hamish wrote: > > - The script relies on "echo -n"; not portable? > > Instead of "echo -n" to build the output map by map, what if a string was > constructed within the loop like: > > if [ $first ] ; then > OUTSTRING="$MAPNAME$MAPSET" > else > OUTSTRING="$OUTSTRING$SEP$MAPNAME$MAPSET" > fi > > > and then at end of the script just a single > echo "$OUTSTRING" > > is that going to max out at 4096 chars?
It's going to create the string in memory, then write it in one go. It could potentially hit a limit on the maximum length of a command if echo isn't a built-in. I don't know whether this is anything other than a theoretical possibility, though. > what should a the C flat 'g.list -g' output look like? how about: > [user1] > map1 > map2 > map3 > [PERMANENT] > map_a > map_b > map_c It would be simpler to parse if the mapset was part of each name, e.g.: [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] [EMAIL PROTECTED] -- Glynn Clements <[EMAIL PROTECTED]> _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

