[GRASS-user] d.polar strange behavior when using MASK
Hamish
hamish_nospam at yahoo.com
Mon Oct 8 17:38:20 EDT 2007
Stefano wrote:
> > cat ${TMP}_raw | grep -v '^*$' <-- very very slow (more than 1h
> > on the same file)
Glynn wrote:
> I must be going blind; I missed that '*' the first time around. '^*$'
> isn't (AFAICT) a valid regexp, as the '*' must be preceded by an
> expression, and I don't think that '^' counts in this context.
>
> I suspect that this is causing grep to get stuck in an infinite loop.
> The * operator repeatedly matches the preceding expression until it
> fails. But matching against ^ doesn't advance the pointer, so no
> matter how many times it matches ^, it's still at the start of the
> line.
>
> If it's meant to eliminate lines which consist of nothing but an
> asterisk, it should be:
>
> grep -v '^\*$'
> or:
> grep -v '^[*]$'
>
> to force the * to be treated literally.
that's the one, it is getting rid of nulls from r.stats. Updated in 6.3-cvs. If
it all tests out ok I'll backport it to 6.2.x as well.
Hamish
____________________________________________________________________________________
Check out the hottest 2008 models today at Yahoo! Autos.
http://autos.yahoo.com/new_cars.html
More information about the grass-user
mailing list