Well, maybe it is not a good idea to grab the output, process and display the output of every command you type on the terminal.
But you can do it for some particular command via tee
your-command | tee saved-output | processing-tool
When you have seen the result from the processing-tool, you can look at the saved-output for example with cat (if short output) or less (if long output).
Example:
$ LANG=C sudo lshw | tee saved-output | grep -i -A2 disk
*-disk
description: ATA Disk
product: KINGSTON SKC300S
physical id: 0.0.0
--
*-disk
description: ATA Disk
product: WDC WD4002FYYZ-0
vendor: Western Digital
$ less saved-output
After a dialogue in a temporary chat forum , I suggest to
It works directly to use vialog like the following example.
vialog 2>&1 | tee saved-output | grep 'docker container ls' && echo 'it was mentioned'
In the real case, I think you would like to start something more advanced than echo 'it was mentioned', but this is only a demo example. And things can be more efficient, if you build the specific checks into vialog and disable the alerts, that are probably not necessary in your case.
Screenshot during the dialogue:

Screenshot after the dialogue:

This way you can easily check if a command that is called is not found:
$ LANGUAGE=C vialog 2>&1 | tee saved-output | grep -i 'Command.*not found' && echo 'it was mentioned'
Command 'docker' not found, but can be installed with:
it was mentioned
$ cat saved-output
----- start vialog at 2019-01-12 18:57:33 ----------------------------
$ docker container ls
Command 'docker' not found, but can be installed with:
sudo apt install docker.io
$ exit
exit
------- end vialog at 2019-01-12 18:58:01 --- used 28 seconds