How would one call a shell command from Python which contains a pipe and capture the output?
Suppose the command was something like:
cat file.log |
Another way similar to Popen would be:
command=r"""cat file.log | tail -1 """ output=subprocess.check_output(command, shell=True)