Markus, We could add the exclude option, but I'm not so sure if we really need it. You can solve your problem by using a more specific wildcard if Paul's trick doesn't work.
pat="gpcp_1dd_p1d_[0-9][0-9][0-9][0-9]_count" It's a little lengthy, but it works. Any better examples where we might want the exclude option? Huidae On Wed, Nov 19, 2008 at 12:40:52PM +0100, Markus Neteler wrote: > On Wed, Nov 19, 2008 at 11:12 AM, Hamish <[EMAIL PROTECTED]> wrote: > > Markus wrote: > >> g.mlist type=rast patt="gpcp_1dd_p1d_*_count" > >> exclude="month" > >> gpcp_1dd_p1d_1997_count > >> gpcp_1dd_p1d_1998_count > >> gpcp_1dd_p1d_1999_count > >> gpcp_1dd_p1d_2000_count > >> gpcp_1dd_p1d_2001_count > >> gpcp_1dd_p1d_2002_count > >> gpcp_1dd_p1d_2003_count > >> gpcp_1dd_p1d_2004_count > >> gpcp_1dd_p1d_2005_count > >> gpcp_1dd_p1d_2006_count > >> gpcp_1dd_p1d_2007_count > >> > >> I know that -r and -e are available but I failed to write > >> an exclusion regex. > >> And often just simple patterns are to be suppressed in the > >> selection. > > > > > > no idea about the C version, but with the shell script version it would > > be roughly like > > > > if [ -n "$GIS_OPT_EXCLUDE" ] ; then > > EXCLD_STR="| grep -v $GIS_OPT_EXCLUDE" > > else > > EXCLD_STR="" > > fi > > > > > > g.list * ... | ... $EXCLD_STR > > Yes - but I dunno how to implement that in C. > > > do you now use g.mlist | grep -v 'expr' ? > > > g.mlist type=rast patt="gpcp_1dd_p1d_*_count" | grep -v month | tr > '\n' ',' | sed 's+,$++g > > but that's rather funky for daily usage. > [for today, Paul's trick helped but the problem will return] > > Markus > _______________________________________________ > grass-dev mailing list > grass-dev@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/grass-dev _______________________________________________ grass-dev mailing list grass-dev@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-dev