Sponsored Content
Full Discussion: Comparing 2 UNIX files
Top Forums UNIX for Dummies Questions & Answers Comparing 2 UNIX files Post 302959369 by Rahul Raj on Sunday 1st of November 2015 08:43:29 PM
Old 11-01-2015
Hi Don,

Thanks for your help and suggestions and apologies for the confussion. Hope the below will explain better :



SOURCE_FILE
Code:
 -----------------------------------
 NAME|CITY|PINCODE
 -----------------------------------
 JUIL | OPUT | 8347648
 KIMU| PETU | 0494744
 OPEY| UEYU| 8912374


TARGET_FILE

Code:
 -----------------------------------
 NAME|CITY|PINCODE
 -----------------------------------
 JUL | OPUT | 8347648
 KIU| PETU | 049444
 OPEY| UYU| 891237



Please find the mismatches report i want to generate

Code:
  NAME|COLUMN_NAME|SOURCE_VALUE|TARGET_VALUE
 ------------------------------------------
 JUIL  | PINCODE   |0494744     |049444
 OPEY|  CITY           |UEYU        |UYU
 OPEY| PINCODE   |8912374     |891237


Last edited by Don Cragun; 11-01-2015 at 10:19 PM.. Reason: Change ICODE tags to CODE tags, and add CODE tags.
 

10 More Discussions You Might Find Interesting

1. UNIX for Advanced & Expert Users

comparing shadow files with real files

Hi I need to compare shadow file sizes with their real file counterparts. If the shadow file size differs form the realfile size then it must send a mail. My problem is that our system has over 1600 shadowfiles in different directories, with different names. the only consistancy is the .sh file... (4 Replies)
Discussion started by: terrym
4 Replies

2. Shell Programming and Scripting

Need help comparing two files and deleting some things in those files!

So I have two files: File1 pictures.txt 1.1 1.3 dance.txt 1.2 1.4 treehouse.txt 1.3 1.5 File2 pictures.txt 1.5 ref2313 1.4 ref2345 1.3 ref5432 1.2 ref4244 dance.txt 1.6 ref2342 1.5 ref2352 1.4 ref0695 1.3 ref5738 1.2 ref4948 1.1 treehouse.txt 1.6 ref8573 1.5 ref3284 1.4 ref5838... (24 Replies)
Discussion started by: linuxkid
24 Replies

3. Shell Programming and Scripting

Comparing the matches in two files using awk when both files have their own field separators

I've two files with data like below: file1.txt: AAA,Apples,123 BBB,Bananas,124 CCC,Carrot,125 file2.txt: Store1|AAA|123|11 Store2|BBB|124|23 Store3|CCC|125|57 Store4|DDD|126|38 So,the field separator in file1.txt is a comma and in file2.txt,it is | Now,the output should be... (2 Replies)
Discussion started by: asyed
2 Replies

4. UNIX for Advanced & Expert Users

How to find duplicates contents in a files by comparing other files?

Hi Guys , we have one directory ...in that directory all files will be set on each day.. files must have header ,contents ,footer.. i wants to compare the header,contents,footer ..if its same means display an error message as 'files contents same' (7 Replies)
Discussion started by: Venkatesh1
7 Replies

5. Shell Programming and Scripting

Comparing files in a directory against an array of files

I hope I can explain this correctly. I am using Bash-4.2 for my shell. I have a group of file names held in an array. I want to compare the names in this array against the names of files currently present in a directory. If the file does not exist in the directory, that is not a problem.... (5 Replies)
Discussion started by: BudMan
5 Replies

6. Shell Programming and Scripting

Comparing Select Columns from two CSV files in UNIX and create a third file based on comparision

Hi , I want to compare first 3 columns of File A and File B and create a new file File C which will have all rows from File B and will include rows that are present in File A and not in File B based on First 3 column comparison. Thanks in advance for your help. File A A,B,C,45,46... (2 Replies)
Discussion started by: ady_koolz
2 Replies

7. Shell Programming and Scripting

Need help in comparing two files in UNIX with a mismatch

Hi Everyone, I am comparing results of two environments using unix files. I am writing two different csv file using spool and merging both the files using paste command paste -d, file1.csv file2.csv > prod_uat_result.csv and then finding the difference and attaching the same in a mail... (8 Replies)
Discussion started by: karthik adiga
8 Replies

8. Shell Programming and Scripting

Comparing two files in UNIX and create a new file similar to equi join

I have 2 files namely branch.txt file & RXD.txt file as below Ex:Branch.txt ========================= B1,Branchname1,city,country B2,Branchname2,city,country B3,Branchname3,city,country B4,Branchname4,city,country B5,Branchname5,city,country RXD file : will... (11 Replies)
Discussion started by: satece
11 Replies

9. UNIX for Beginners Questions & Answers

Comparing 2 variables in UNIX

Hi, I have 2 variables as given below. How can i compare them and say its matching ? Appreciate your help VAR1=describe/read/write VAR2=read/write/describeThanks, Please use CODE tags as required by forum rules! (4 Replies)
Discussion started by: prince1987
4 Replies

10. UNIX for Beginners Questions & Answers

Comparing two files and list the difference with common first line content of both files

I have two file as given below which shows the ACL permissions of each file. I need to compare the source file with target file and list down the difference as specified below in required output. Can someone help me on this ? Source File ************* # file: /local/test_1 # owner: own #... (4 Replies)
Discussion started by: sarathy_a35
4 Replies
Mail::SPF::Mod::Exp(3)					User Contributed Perl Documentation				    Mail::SPF::Mod::Exp(3)

NAME
Mail::SPF::Mod::Exp - SPF record "exp" modifier class DESCRIPTION
An object of class Mail::SPF::Mod::Exp represents an SPF record modifier of type "exp". Constructors The following constructors are provided: new(%options): returns Mail::SPF::Mod::Exp Creates a new SPF record "exp" modifier object. %options is a list of key/value pairs representing any of the following options: domain_spec See "new" in Mail::SPF::Mod. new_from_string($text, %options): returns Mail::SPF::Mod::Exp; throws Mail::SPF::ENothingToParse, Mail::SPF::EInvalidMod Creates a new SPF record "exp" modifier object by parsing the string and any options given. Class methods The following class methods are provided: name: returns string Returns 'exp'. name_pattern: returns Regexp Returns a regular expression that matches a modifier name of 'exp'. precedence: returns real Returns a precedence value of 0.2. See "precedence" in Mail::SPF::Mod. Instance methods The following instance methods are provided: params See "params" in Mail::SPF::Mod. domain_spec: returns Mail::SPF::MacroString Returns the "domain-spec" parameter of the modifier. process($server, $request, $result) If the given SPF result is a "fail" result, retrieves the authority domain's explanation string from the modifier's target domain and attaches it to the SPF result. If an error occurs during the retrieval of the explanation string, does nothing, as if the modifier was not present. See RFC 4408, 6.2, for details. See Mail::SPF::Mod for other supported instance methods. SEE ALSO
Mail::SPF, Mail::SPF::Mod, Mail::SPF::Term, Mail::SPF::Record <http://tools.ietf.org/html/rfc4408> For availability, support, and license information, see the README file included with Mail::SPF. AUTHORS
Julian Mehnle <julian@mehnle.net>, Shevek <cpan@anarres.org> perl v5.18.2 2017-10-06 Mail::SPF::Mod::Exp(3)
All times are GMT -4. The time now is 05:36 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy