Is there a simple utility which I can pipe output to on Linux that will:
- Return a success code if there is no output on standard out (and / or standard error).
- Return a failure code if output is produced on standard out (and / or standard error).
To provide some context, the command I'm running is:
svn mergeinfo --show-revs eligible
http://mysvnserver.example.com/SVF/repos/common/abc/branches/abc-1.7
http://mysvnserver.example.com/SVF/repos/common/abc/trunk
If there are any unmerged entries on the branch, the command will return a list of revision numbers on standard out. Ideally, the additional command that I'm talking about would:
- Detect entries on standard out and return an error condition to Linux.
- Pass on the standard out so that it does end up appearing on the terminal. I'd rather not suppress it.