I get a problem when executing this command:
sudo /usr/bin/comm -13 < (sort test.tsv) < (sort test_2.tsv)
Error: d_t.sh: line 4: syntax error near unexpected token `(' d_t.sh: line 4: `sudo /usr/bin/comm -13 < (sort test.tsv) < (sort test_2.tsv)'
I get a problem when executing this command:
sudo /usr/bin/comm -13 < (sort test.tsv) < (sort test_2.tsv)
Error: d_t.sh: line 4: syntax error near unexpected token `(' d_t.sh: line 4: `sudo /usr/bin/comm -13 < (sort test.tsv) < (sort test_2.tsv)'
Proper process substitution syntax would be:
sudo /usr/bin/comm -13 <(sort test.tsv) <(sort test_2.tsv)
There is no space between the the "<" or ">" and the parentheses.
See the bash hackers wiki page on process substitution.
Also note that process substitution is not supported by POSIX sh.
Try using sudo:
sudo sort test.tsv > text1.tsv sudo sort test2.tsv > text2.tsvsudo comm -13 text1.tsv text2.tsvYou can use one by one command
sort test.tsv > text1.tsv sort test2.tsv > text2.tsv comm -13 text1.tsv text2.tsvYou can try to use one by one command
sort test.tsv > text1.tsv
sort test2.tsv > text2.tsv
comm -13 text1.tsv text2.tsv