file comparison and output.

If none of the more specific forums is the right place to ask

file comparison and output.

Postby tdave » 2020-09-11 06:42

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 ... te-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.
tdave
 
Posts: 17
Joined: 2020-08-30 23:08

Re: file comparison and output.

Postby Bloom » 2020-09-11 06:49

Code: Select all
comm -3 txtfile1 txtfile2 >txtfile3

Should to the trick.
User avatar
Bloom
 
Posts: 290
Joined: 2017-11-11 12:23

Re: file comparison and output.

Postby CwF » 2020-09-11 13:23

If you don't mind a GUI that works well, try MELD.
CwF
 
Posts: 767
Joined: 2018-06-20 15:16

Re: file comparison and output.

Postby tdave » 2020-09-11 17:07

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.
tdave
 
Posts: 17
Joined: 2020-08-30 23:08


Return to General Questions

Who is online

Users browsing this forum: No registered users and 11 guests

fashionable