I have the below code but it prints all the logs but I only want the last command log from the paramiko channel.recv()
#Unnecessary this output also comming/printing
channel.send("python "+pycmd+"\n")
channel.send("rm "+sys.argv[10]+"/"+py_file+"\n")
#The output of this command I need
channel.send("cat "+sys.argv[16]+"\n")
op_t=(channel.recv(1024).decode('UTF-8', 'ignore'))
op_t_output = op_t.lower().replace("\r\n", " ").strip()
print(op_t_output)
How can I get the last cat command out put only