The answer is: maybe.
Among the types of scripts that TM ART can record and playback are Telnet terminal emulators. If you can connect to the Linux system via a telnet program from a Windows system running the Workbench and Recorder, then you might have some success. This will work best if the telnet program is a very old-fashioned line more client. Programs that emulate any kind of full screen terminal tend to clutter up the datastream making it hard to get just the bits you want.
Note that SSH-based connections cannot be recorded. Unlike HTTPS, SSH can't be abused to allow a man-in-the-middle so there's no way for the Recorder to grab unencrypted traffic.
I've done that using the Plink executable, which is part of Putty tools. In the below example, C:\plinkdata.txt contains the commands I want to run. So that is where you'd put your "grep" command etc. For the purpose of the simple test below, the command in my file is just "w", and from the response I verify the string "load average". Note that I'm also using a separate command with "echo y" for the first time the script is run on an Execution Server, which emulates pressing "y" for accepting the server host key. There might be a more eloquent way of handling that, but this method works fine nonetheless.
TInit : begin;
TMain : 1;
CONST_TIMEOUT := 120;
hFile : number;
hProcessId : number;
sDataDir : string;
sResultDir : string;
sStdout : string;
sStderr : string;
GetDirectory(DIRECTORY_RESULT, sResultDir, sizeof(sResultDir));
//Suppress FOpen warnings on using absolute paths
ErrorAdd(FACILITY_RESERR, 1014, SEVERITY_INFORMATIONAL);
sStdout := sResultDir+"Stdout.txt";
sStderr := sResultDir+"Stderr.txt";
FOpen(hFile, sStdout, OPT_FILE_ACCESS_READWRITE, OPT_FILE_CREATE);
//The below section is only required for the first time execution server run, can be commented out afterwards
hProcessId := ProcessInitialize("cmd /c", PROCESS_ATTACHED, " echo y | C:\\Windows\\plink.exe -ssh *HOST_IP* -l root -pw *PASSWORD* exit", "", sStdout, sStdErr, CONST_TIMEOUT);
hProcessId := ProcessInitialize("C:\\Windows\\plink.exe", PROCESS_ATTACHED, " -ssh -v *HOST_IP* -l root -pw *PASSWORD* -m C:\\plinkdata.txt", "", sStdout, sStdErr, CONST_TIMEOUT);
FOpen(hFile, sStdout, OPT_FILE_ACCESS_READWRITE, OPT_FILE_OPENCREATE);
FRead(hFile, sData, 200);
if not FFindString(hFile, "load average") then
MeasureInc("Av_Application node unavailable");