問題タブ [comm]

For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.

0 投票する
5 に答える
118 参照

linux - 空白の通信出力を削除

コマンドと比較している ID のリストが 2 つありますcomm。私の問題は、出力が次のようになることです。

All I want to do is try to pipe it somehow so the file is written with out the empty spcaces, that translate into white cell when I open this files in excel. I have tried every possible combination I have found of grep, awk and sed to remove blank spaces without luck...
So I have came to the conclusion that columns are separated by one or two tabs respectively, therefore I can not remove them as easily as removing blank spaces without removing the formating of the file.

any help or suggestion will be welcomed. Thanks

EDIT:

I want my output to be three columns, tab delimited without the blank spaces

EDIT2 to avoit XY Problem as referenced:

元の問題 (X): リストを作成する必要があり、両方のリスト間で共通の単語と一意の単語を見つけたい (後でベン図を生成するため)。comm3 つのリストを同時に取得し、後で簡単に Excel にインポートできるので、完璧なソリューションのように思えました。

二次的な問題 (Y): 生成される 3 つの列は 3 つの列ではありません (または、そう思い始めています) 。また、通常のorcut -fで空白を削除することもできません(たとえば)。awk 'NF'grep .

0 投票する
2 に答える
1658 参照

unique - 2 つのファイル間の一意の行を見つける

2 つの非常に大きなファイル (ファイル 1 とファイル 2) があり、ファイル 1 には多くの行と列があり、わかりやすくするために列 1 を貼り付けています。ファイル 1 に固有の行だけを印刷したい。

ファイル 1:

ファイル 2:

出力:

Ubuntuでコマンドを試しcommましたが、完全なパターンをチェックするため機能しませんでした。そのため、確認しようとするAT1G01010.1AT1G01010、一般的なものは何も表示されません。