[GRASS-dev] Simplified G_percent() output in batch jobs?

Glynn Clements glynn at gclements.plus.com
Wed Nov 5 17:31:10 EST 2008


Markus Neteler wrote:

> >> I am running a large number of processing jobs on a
> >> cluster and the job manager output is cluttered with
> >> control chars from G_percent().
> >> It would be great to have a switch (or detection magic)
> >> to output the plain ASCII style 0..10...20.. in this cases.
> >>
> >> Maybe it's already there?
> >
> > The closest is:
> >
> >        export GRASS_MESSAGE_FORMAT=gui
> >
> > That's a bit noisy, but it does eliminate the BS characters.
> 
> Right, but it's too noisy, too.
> 
> Attached a patch proposal which outputs:
> 
> export GRASS_MESSAGE_FORMAT=batch
> r.slope.aspect elevation as=myaspect
> 2..5..8..11..14..17..20..23..26..29..32..35..38..41..44..47..50..53..56..59..62..65..68..71..74..77..80..83..86..89..92..95..98..100..
> Aspect raster map <aspect> complete
> 
> Looks ok?

Yes, except that I'm not sure about the name; maybe "plain"?

This isn't just an issue for batch jobs; my usual "terminal" is
XEmacs' shell-mode, which doesn't process ^H (or ^M or ^G for that
matter).

[For programs which use ^M, you can at least use "stty ocrnl".]

Maybe a better solution is to allow the specification of an arbitrary
string which is used to "rewind" percent output.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list