[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Capturing *all* the output (both stdout and stderr) from the apt-cache command.



I originally asked something similar here http://unix.stackexchange.com/q/201869/31347 but did not get the comprehensive answer.

The complete question would be: how to capture everything apt-cache outputs?

Example:

apt-cache policy non_existing_package --- here we need to capture stderr
apt-cache policy apt --- here we need to capture stdout

So is there a generic command that could capture everything and pipe further so that the call like

apt-cache policy ... | grep "something" --- was successful?

--
With best regards, Ivan Kurnosov

Reply to: