[英]Error comparing files with bash script
我有兩個具有這種性質的txt文件:
ENSG00000002587
ENSG00000002746
ENSG00000008300
ENSG00000015413
當我嘗試使用腳本比較它們時
$ comm -23 <(sort file1.txt|uniq)> <(sort file2.txt|uniq)>
我得到以下內容:
bash: syntax error near unexpected token 'newline'
我最近更換了電腦; 這在我以前的計算機上工作正常。 任何意見,將不勝感激。
您的命令在我看來不正確。 刪除>
。 進程替換的語法是<(command_list)
,而不是<(command_list)>
。
嘗試:
comm -23 <(sort file1.txt|uniq) <(sort file2.txt|uniq)
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.