What about:
- Exit code - only provided at the end. Normally 0 for success, but grep returns 1 if no match, which might or might not be acceptable also.
- Do you want to stream the output (e.g. piping through
gzip
), or wait for the definiteness of the exit code first? - STDERR output, if any (rather than just STDOUT)
- For completeness - might want to be piping via STDIN to e.g.
gzip
I gave some basic predicates at How to get shell echo in Prolog variables - #15 by brebs
Haven’t looked at it since. This could do with a standard library, sure.