How can I check that the piped input matches a string exactly, preferably in a single line?
For example:
some command | <check that equals "foo" exactly>
Where it would return an exit code of 0 if it was an exact match.
I tried using grep, but I don't want an exit code of 0 if the input was "foobar" for example, only if it is exactly "foo"