How to use subprocess in Python to run a BASH command that is very complicated (has a lot of redirection and multiple parts)? [duplicate]
问题 This question already has answers here : Bash style process substitution with Python's Popen (1 answer) How to use `subprocess` command with pipes (9 answers) Closed 4 months ago . I am trying to run the following BASH command in Python but I am running into trouble because of all the redirection ("<", ">", "|") and parentheses. "comm -13 <(sort 9-21-pull/animals.tsv | uniq) <(sort full-data/9-28-full-data/animals.tsv | uniq) > 9-28-pull/animals.tsv" How do I run this BASH command in Python