[GRASS-dev] g.mlist as C implementation?

Hamish hamish_nospam at yahoo.com
Wed Sep 12 06:47:58 EDT 2007


> - 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?



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


?
Hamish




More information about the grass-dev mailing list