[GRASS-SVN] r30437 - grass/trunk/scripts/g.mlist
svn_grass at osgeo.org
svn_grass at osgeo.org
Mon Mar 3 05:15:38 EST 2008
Author: 1gray
Date: 2008-03-03 05:15:38 -0500 (Mon, 03 Mar 2008)
New Revision: 30437
Modified:
grass/trunk/scripts/g.mlist/g.mlist
Log:
scripts/g.mlist/g.mlist (do_list): Fixed `pattern=-FOO' to work with
`-r'; reduced off one `grep'; use `grep .' instead of `grep -v '^$'';
more Shell quoting for the sake of a better coding style.
Modified: grass/trunk/scripts/g.mlist/g.mlist
===================================================================
--- grass/trunk/scripts/g.mlist/g.mlist 2008-03-03 09:43:40 UTC (rev 30436)
+++ grass/trunk/scripts/g.mlist/g.mlist 2008-03-03 10:15:38 UTC (rev 30437)
@@ -66,14 +66,13 @@
MAPSET=""
fi
- g.list type=$type mapset=$mapset \
- | grep -v '^-\+$' \
- | grep -v "files available" \
+ g.list type="$type" mapset="$mapset" \
+ | grep -vE '^-+$|files available' \
| grep -vi "mapset" \
| sed 's/ */\
/g' \
- | grep -v '^$' \
- | grep "$search" \
+ | grep . \
+ | grep -- "$search" \
| sort \
| sed -e "s/$/$MAPSET/"
}
More information about the grass-commit
mailing list