Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

file comparison and output.

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
tdave
Posts: 17
Joined: 2020-08-30 23:08

file comparison and output.

#1 Post by tdave »

Trying to campare two text files and output to a third one. tried diff but it does not do what I want and after reading about it I found out should not. diff is for writeing patch files. not what i want to do. I am trying to save hours of work it would take to delete everything that is the same in these two files. I found this on the subject but have not been able to get it to work.ttps://unix.stackexchange.com/questions/171113/bash-scripting-problem-compare-two-lists-and-create-a-third

When I run the command..

Code: Select all

ttps://unix.stackexchange.com/questions/171113/bash-scripting-problem-compare-two-lists-and-create-a-third
I get ambiguous redirect.. when I look that up I find that more then one thing can cause that but nothing I have found so far has solved the problem. any ideals about what could cause it or fix it.

User avatar
Bloom
df -h | grep > 90TiB
df -h | grep > 90TiB
Posts: 504
Joined: 2017-11-11 12:23
Been thanked: 26 times

Re: file comparison and output.

#2 Post by Bloom »

Code: Select all

comm -3 txtfile1 txtfile2 >txtfile3
Should to the trick.

CwF
Global Moderator
Global Moderator
Posts: 2679
Joined: 2018-06-20 15:16
Location: Colorado
Has thanked: 41 times
Been thanked: 196 times

Re: file comparison and output.

#3 Post by CwF »

If you don't mind a GUI that works well, try MELD.

tdave
Posts: 17
Joined: 2020-08-30 23:08

Re: file comparison and output.

#4 Post by tdave »

If you don't mind a GUI that works well, try MELD.
just my luck that i tried the wrong gui. Kompare either does not as advertised or I am not smart enough to get it to work even with it's help file.

Post Reply