search_response

support.process.search_response(command_list1, command_list2)

Search a local command response.

command_list2 is usually some form of ‘grep’

Example:

In [14]: process_tools.search_response(["ps", "-ef"],["grep", "python"])
Out[14]:
  ['kuiper    3696  3669  0 09:57 pts/1    00:00:00 /usr/bin/python                                                           /usr/bin/ipython\n',
   'kuiper    3785  3696  0 10:17 pts/1    00:00:00 grep python\n']

:param command_list1 : the command which generates the initial output :type command_list1 : list of str

:param command_list2 : the command which searches the output :type command_list2 : list of str

Returns

line(s) with the match