import subprocess
output = subprocess.check_output(
    "cat syscall_list.txt | grep f89e7000 | awk '{print $2}'", shell=True)
How to store the result of an executed shell command in a variable in python?