Our product exposes an admin console by embedding an ssh server (java based) and exposing a bunch of custom commands. The output of some of these commands can be pretty verbose. Currently we handle these by having flags like -dump to dump output to a text file for later processing.
I was wondering if it were possible to pipe the output to standard unix utilities like grep (non interactive) and less (interactive) so that the user could analyze the results without leaving the terminal. This needs to work only on linux currently.
Piping to interactive commands seems almost impossible, but any remotely helpful suggestions would be greatly appreciated (and upvoted)
Keep the interactive commands on the local host and non-interactive on the remote, i.e.
The
lesscommand runs locally unless you include it in quotes: