Compare two file in UNIX


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers Compare two file in UNIX
# 1  
Old 10-15-2013
Compare two file in UNIX

Hi,

how to compare all the differences from two files in unix ?

plz provide the screenshots.


Thanks,
Dasaradha

Last edited by Scott; 10-15-2013 at 04:03 AM.. Reason: Moved thread; hardly an expert topic
# 2  
Old 10-15-2013
Use diff.

If that isn't suitable then you need to provide more details, like example inputs and output.
 
Login or Register to Ask a Question

Previous Thread | Next Thread

8 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Shell script (sh file) logic to compare contents of one file with another file and output to file

Shell script logic Hi I have 2 input files like with file 1 content as (file1) "BRGTEST-242" a.txt "BRGTEST-240" a.txt "BRGTEST-219" e.txt File 2 contents as fle(2) "BRGTEST-244" a.txt "BRGTEST-244" b.txt "BRGTEST-231" c.txt "BRGTEST-231" d.txt "BRGTEST-221" e.txt I want to get... (22 Replies)
Discussion started by: pottic
22 Replies

2. Shell Programming and Scripting

File compare in UNIX

I have two files which is having components and its version inside that, cat file1 com.acc.invm:FNS_PROD com.acc.invm:FNS_TEST_DCCC_Mangment com.acc.invm:FNS_APIPlat_BDMap com.acc.invm:SendEmail com.acc.invm:SendSms cat file2 com.acc.invm:FNS_PROD 94.0.5... (11 Replies)
Discussion started by: rakeshtomar82
11 Replies

3. Shell Programming and Scripting

Compare output of UNIX command and match data to text file

I am working on an outage script and I run a command from the command line which tells me the amount of generator failures in my market. The output of this command only gives me three digits to identify the site by. I have a master list of all sites in a separate file, call it list.txt. If my... (7 Replies)
Discussion started by: jbrass
7 Replies

4. Homework & Coursework Questions

Compare to values in a file in unix

Here is sample file ===============Index 0=================== isActive=0, Input=1, Output=1, Status=1 State = Future , PRIMARY UnderCount=2 inCount=2 outCount=0 SCount=673 -- ===============Index 1=================== isActive=0, Input=1, Output=1, Status=1 ... (1 Reply)
Discussion started by: sooda
1 Replies

5. Shell Programming and Scripting

Compare two files in UNIX

Hi, I have two files File1 Contents: abc dcf sdc File2 Contents: dcf sdc erg Now my program should return the contents existing in File1 but not in File2. In this case output shoud be "abc" as abc is not available in File 2. It should not return "erg" by saying it is... (4 Replies)
Discussion started by: forums123456
4 Replies

6. Shell Programming and Scripting

Unix script to compare the two file

Hi, I want to compare two | delimited files.Awk is not working in my unix box.So plz give alternate solutions. Please see the below code: file1=$1 file2=$2 num_of_records_file1=`awk ' END { print NR } ' $file1` num_of_records_file2=`awk ' END { print NR } ' $file2` i=1 while do... (4 Replies)
Discussion started by: autosys_nm
4 Replies

7. Programming

compare XML/flat file with UNIX file system structure

Before i start doing something, I wanted to know whether the approach to compare XML file with UNIX file system structure. I have a pre-configured file(contains a list of paths to executables) and i need to check against the UNIX directory structure. what are the various approches should i use ? I... (6 Replies)
Discussion started by: shafi2all
6 Replies

8. UNIX for Advanced & Expert Users

Help- Unix File Compare- Struggling

I had posted this earlier about 3 weeks ago and had recieved a response and I did sort both the files and the comm command is still not working. Can someone please assist me, I would really appreciate it. Below is what I am trying to do I need to compare File A with File B and create FILE C... (2 Replies)
Discussion started by: guiguy
2 Replies
Login or Register to Ask a Question