You can express those conditions using regular expressions and use
grep to filter the results based on those.
The first one is
^?. The carat is a special character that represents the beginning of a line; so that expression matches the beginning of the line immediately followed by a
The second one is
^ *\*. The
* is a special character that qualifies the preceding character - it means the preceding character may appear zero or more times. Since
* is a special character, the one you're looking for needs to be escaped, hence,
\*. So that expression will match the beginning of a line followed by zero or more spaces, followed by an asterisk.
For your first condition, use the
-v option for
grep to negate the results.
svn status --show-updates | grep -v '^?'
svn status --show-updates | grep '^ *\*'
Regular expressions are very powerful, so many Unix tools can use them. They are very much worth learning. There is a great tutorial at regular-expressions.info.