Unix supports arbitrary pipe chaining - You can use pipe or mkfifo to create a series of pipes, and a version of grep that output non-matching lines to an additional file descriptor or to a named fifo to separate out the records. Fundamentally, this is a tooling issue - Unix shells expose the one-dimensional workflow well.