in Education by
I am familiar with tools such as tkDiff and WinMerge and am aware of how to see the difference between two files. What I'm looking to do is to produce a report of elements in one file that are not present in another. For example: File1 contains: apple cool dude flan File2 contains: apple ball cool dude elephant I want to produce a report that contains: ball elephant Or, better yet, a report like this: +ball +elephant -flan Does anybody know of a tool that can do this? Preferably with command line options. The report feature in WinMerge isn't too far off what I'd like but there is no command line option to do this (as far as I know). Thanks in advance. JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
This might work for you (GNU diff): diff -u file1 file2 | sed -n '1,2d;/^[-+]/p' +ball -flan +elephant

Related questions

0 votes
    I am familiar with tools such as tkDiff and WinMerge and am aware of how to see the difference between ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 17, 2022 in Education by JackTerrance
0 votes
    Write a Java program to read two strings from command line arguments and check the equality of two strings using string function. Select the correct answer from above options...
asked Dec 9, 2021 in Education by JackTerrance
0 votes
    I have 2 large files (each about 500k lines or 85mb) containing the checksum of the file and the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    I'm trying to execute the following command: arp -a and I would like to redirect the output to a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 26, 2022 in Education by JackTerrance
0 votes
    I'm trying to execute the following command: arp -a and I would like to redirect the output to a ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Jul 20, 2022 in Education by JackTerrance
0 votes
    Give at least two to three differences between rint() and round() in Java… Please give the answer in points.. Select the correct answer from above options...
asked Dec 25, 2021 in Education by JackTerrance
0 votes
    two differences between call by value and call by refernce plz Select the correct answer from above options...
asked Dec 24, 2021 in Education by JackTerrance
0 votes
    Phylum Platyhelminthes and Phylum Aschelminthes. OR Write any two points of differences between flat worms ... proposed by,electromagnetic theory engineering physics,Science nptel...
asked Nov 7, 2021 in Education by JackTerrance
0 votes
    State the two differences between Built-In and Repository in Talend?...
asked Mar 16, 2021 in Technology by JackTerrance
0 votes
    How can we see the differences between the two branches in Git?...
asked Jan 8, 2021 in Technology by JackTerrance
0 votes
    What are the differences between t.test() and t.data.frame()? When do you use these two functions?...
asked Oct 16, 2020 in Technology by JackTerrance
0 votes
    A tried using the AWS CLI for listing the files in the S3 bucket using: aws s3 ls s3://myS3bucket --recursive -- ... How can I do that? Select the correct answer from above options...
asked Jan 24, 2022 in Education by JackTerrance
0 votes
    What kind of files can be imported or exported using the COPY command (1)sstables (2)CSV (3)json (4)parquet...
asked May 6, 2021 in Education by JackTerrance
0 votes
    What kind of files can be imported or exported using the COPY command (1)sstables (2)CSV (3)json (4)parquet...
asked Apr 17, 2021 in Technology by JackTerrance
...