Compare two files in UNIX | Unix Linux Forums | Shell Programming and Scripting

  Go Back    


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

Compare two files in UNIX

Shell Programming and Scripting


Closed Thread    
 
Thread Tools Search this Thread Display Modes
    #1  
Old 02-20-2013
babu92 babu92 is offline
Registered User
 
Join Date: Feb 2013
Last Activity: 20 February 2013, 9:08 AM EST
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Compare two files in UNIX

I have requirement to compare two files in unix. Below are the sample files.

File1:
cn=test123,cn=bobgroup,dc=ind,dc=com
cn=bob123,cn=bobgroup,dc=ind,dc=com
cn=test13,cn=bobgroup,dc=ind,dc=com
cn=est12,cn=bobgroup,dc=ind,dc=com
cn=st123,cn=bobgroup,dc=ind,dc=com

File2
cn=test123,cn=bobgroup,dc=ind,dc=com
cn=est123,cn=testgroup,dc=ind,dc=com
cn=est123,cn=bobgroup,dc=ind,dc=com

I want to compare file 1 with file 2. If it matches i wan to move it different file otherwise i want to move different file? Any Ideas?
Sponsored Links
    #2  
Old 02-20-2013
DukeNuke2's Avatar
DukeNuke2 DukeNuke2 is offline Forum Staff  
Soulman
 
Join Date: Jul 2006
Last Activity: 1 August 2014, 3:56 AM EDT
Location: Berlin, Germany
Posts: 5,375
Thanks: 54
Thanked 229 Times in 222 Posts
Do not post classroom or homework problems in the main forums. Homework and coursework questions can only be posted in this forum under special homework rules.

Please review the rules, which you agreed to when you registered, if you have not already done so.

More-than-likely, posting homework in the main forums has resulting in a forum infraction. If you did not post homework, please explain the company you work for and the nature of the problem you are working on.

If you did post homework in the main forums, please review the guidelines for posting homework and repost.

Thank You.

The UNIX and Linux Forums.
Sponsored Links
Closed Thread

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare two files in UNIX forums123456 Shell Programming and Scripting 4 08-02-2011 09:21 PM
How to compare two files using UNIX? gpsridhar UNIX for Advanced & Expert Users 6 10-22-2010 03:19 AM
how can i unix compare two files?? nirnir26 UNIX for Dummies Questions & Answers 2 11-19-2009 06:52 AM
Unix Compare Files Lagre1 UNIX for Dummies Questions & Answers 2 12-11-2008 01:19 PM
UNIX; Compare two files abhishek3598 UNIX for Advanced & Expert Users 1 11-06-2007 05:52 PM



All times are GMT -4. The time now is 05:50 AM.