I have two lists of IDs that I am comparing with comm
command. My problem is that output looks like this:
YAL002W
YAL003W
YAL004W
YAL005C
YAL008W
YAL011W
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
YAL002W YAL004W YAL008W
YAL003W YAL005C
YAL011W
EDIT2 to avoit XY Problem as referenced:
Original problem (X): I have to lists and I want to find common and unique words between both lists (To generate a Venn diagram later on). So comm
seemed like the perfect solution since I get all three lists at the same time, which I can later on import into excel easily.
Secondary problem (Y): The three columns that are generated are not three columns (or so I am starting to think) since I can't cut -f
them, nor I can't remove the blank spaces with usual awk 'NF'
or grep .
(for example).