Sponsored Content
Full Discussion: Compare 2 flat files
Top Forums Shell Programming and Scripting Compare 2 flat files Post 302110927 by ganesh123 on Friday 16th of March 2007 12:12:17 PM
Old 03-16-2007
Compare 2 flat files

Hi Gurus,

I searched the forum but didnt get much info.
I want to compare 2 files.

1)Newfile comes today with
2)Old file of previous day.

The files are same ,just the new files might have new records sometimes.

So I want to capture these new records in another file.

Can anyone help me in this ??

Thanks
 

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Flat Files

I have a flat file like this 0001 THER ULT HEAD & NECK VES 0002 THER ULTRASOUND OF HEART 0003 THER ULT PERIPHERAL VES 0009 OTHER THERAPEUTIC ULTSND 0010 IMPLANT CHEMOTHERA AGENT 0011 INFUS DROTRECOGIN ALFA 0012 ADM INHAL NITRIC OXIDE I need to conver this to a comma delimited flat file... (2 Replies)
Discussion started by: thumsup9
2 Replies

2. Shell Programming and Scripting

How to compare data in two flat files and update them?

Hi All, I am giving an example similar to the problem I have. I have two data files of 10 columns each in which fields are delimited by comma(,). I need to compare compare the two files using the uniq col(col3). If there are any records in file1 and are not in file2 then I have check the value... (3 Replies)
Discussion started by: rajus19
3 Replies

3. Shell Programming and Scripting

How to compare two flat files and get changed data

Hi, I need to compare two flat files (yesterday & today's data) and get only the changed data from flat files. In flat file i dont have data column or anything its just a string data in flat file.Can any one please let me know the script With Regds Shashi (3 Replies)
Discussion started by: jtshashidhar
3 Replies

4. 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

5. Shell Programming and Scripting

Compare 2 flat files

Hi Frnds, I have a flat file with millions of records. . Now I on this. (I prefer for AWK as its gives good performance.) Old_file.txt ------------------ 1 gopi ase .... 2 arun pl ... 3 jack sutha .. 4 peter pm .. ... New_file.txt --------------- 4 peter pm .. .. ... (12 Replies)
Discussion started by: Gopal_Engg
12 Replies

6. Shell Programming and Scripting

awk to compare flat files and print output to another file

Hello, I am strugling from quite a some time to compare flat files with over 1 million records could anyone please help me. I want to compare two pipe delimited flat files, file1 with file2 and output the unmatched rows from file2 in file3 Sample File1: ... (9 Replies)
Discussion started by: suhaeb
9 Replies

7. Shell Programming and Scripting

Require compare command to compare 4 files

I have four files, I need to compare these files together. As such i know "sdiff and comm" commands but these commands compare 2 files together. If I use sdiff command then i have to compare each file with other which will increase the codes. Please suggest if you know some commands whcih can... (6 Replies)
Discussion started by: nehashine
6 Replies

8. UNIX for Dummies Questions & Answers

Compare two flat files and update one based on the values in the other

Hi, I'm a newbie to scripting and am trying to compare two files using awk. The files are exactly the same dimensions. Where the first file has 0's I would like to create an updated version of the second file which has the corresponding elements set to zero also. eg: file1: 12345 1 2 0... (3 Replies)
Discussion started by: kasan0
3 Replies

9. Shell Programming and Scripting

Compare to flat files using awk

compare to flat files using awk .but in 4th field contains non ordered substring. how to do that. file1.txt john|0.0|4|**:25;JP:50;UY:25 file2.txt andy|0.0|4|JP:50;**:25;UY:25 (4 Replies)
Discussion started by: veeruasu
4 Replies

10. Shell Programming and Scripting

Converting Multiline Files to Flat Files?

How to convert this: F1-R1 F1-R2 F1-R3 into a flat file for bash?? Each record F2-R1 F2-R2 F2-R3 F3-R1 F3-R2 F3-R3 F4-R1 F4-R2 F4-R3is on one line with all fields for that record, put into an output file. The output file should look like this when converted: F1-R1,F2-R1,F3-R1,F4-R1... (6 Replies)
Discussion started by: bud1738
6 Replies
pkgutil(1)						    BSD General Commands Manual 						pkgutil(1)

NAME
pkgutil -- Query and manipulate Mac OS X Installer packages and receipts. SYNOPSIS
pkgutil [options] [commands] DESCRIPTION
pkgutil reads and manipulates Mac OS X Installer flat packages, and provides access to the ``receipt'' database used by the Installer. Options are processed first, and affect the operation of all commands. Multiple commands are performed sequentially in the given order. The files and directories where receipts are stored are subject to change. Always use pkgutil to query or modify them. OPTIONS
--help, -h A brief summary of commands and usage. --force, -f Don't ask for confirmation before performing a potentially destructive or ambiguous operation. --verbose, -v Output in a "human-readable" format with extra headers, footers, indentation, and other contextual information. --volume path Perform all operations on the specified volume or home directory. The root volume '/' will be used if unspecified. --edit-pkg package-id Specifies an existing receipt to be modified in-place by --learn. --only-files List only files (not directories) in --files listing. --only-dirs List only directories (not files) in --files listing. --regexp Try to match package-id arguments as a regular expression if an exact match isn't found. See egrep(1) and re_format(7) for syn- tax. RECEIPT DATABASE COMMANDS
--packages, --pkgs List all installed package IDs on the specified --volume. --pkgs-plist List all installed package IDs on the specified --volume in Mac OS X plist(5) format. --pkgs=REGEXP List all installed package IDs matching REGEXP on the specified --volume. The equal sign (=) is required or the search string will be ignored and all package IDs will be returned. Be mindful of escaping characters in both your shell and the regular expression. (Eg, 'pkgutil --pkgs=\.D' searches for package IDs matching the literal '.D' after escaping the backslash from your shell and then the dot from the regex to make it literal.) Regular expressions are more complex than simple shell globbing. A dot (.) matches any character, while '*' matches zero or more of the previous character. See re_format(7) for a complete description of the syntax. --files package-id List all of the files installed under the package-id. --export-plist package-id Print all receipt information about the specified package-id in the standard Mac OS X plist(5) format. --verify package-id Run repair_packages(8) to verify the specified package-id. --repair package-id Run repair_packages(8) to repair the specified package-id. --pkg-info package-id Print extended information about the specified package-id. --pkg-info-plist package-id Print extended information about the specified package-id in Mac OS X plist(5) format. --forget package-id Discard all receipt data about package-id, but do not touch the installed files. DO NOT use this command from an installer pack- age script to fix broken package design. --learn path Update the ACLs of the given path in the receipt identified by --edit-pkg. This affects subsequent repair operations on the package. This command cannot be used from package postinstall scripts, but if a postinstall script changes the ACLs on the installed files, the receipt is automatically be updated to reflect those changes. This command will not update the filesystem permissions in the receipt. --pkg-groups package-id List all of the package groups this package-id is a member of. --groups List all of the package groups on the specified --volume. --groups-plist List all of the package groups on the specified --volume in Mac OS X plist(5) format. --group-pkgs group-id List all of the packages that are members of this group-id. --file-info path Show the metadata known about path. --file-info-plist path Show the metadata known about path in Mac OS X plist(5) format. FILE COMMANDS
--expand pkg-path dir-path Expand the flat package at pkg-path into a new directory specified by dir-path. --flatten dir-path pkg-path Flatten the dir-path into a new flat package created at pkg-path. The directory to be flattened must have the proper contents and layout for a flat package. This is not intended as a substitute for pkgbuild(1). --bom path Extract any BOM files from the flat pkg at path into /tmp and return the filename(s). Suggested use is as an argument to lsbom(8). Eg, "lsbom `pkgutil --bom path`". Note that some flat package archives may contain no BOM, one BOM, or several BOMs. --payload-files path List the files archived within the payload of the uninstalled flat package(s) contained at path. This should be equivilant to "lsbom -s `pkgutil --bom path`". Note that flat package archives may contain more than one package, and the destination location for the uninstalled package(s) is unknown to this command. --check-signature pkg-path Check the validity and trust of the signature on the package at pkg-path. In addition to the status of the signature, the asso- ciated certificate chain will be shown. SEE ALSO
installer(8) repair_packages(8) pkgbuild(1) productbuild(1) Mac OS March 2, 2011 Mac OS
All times are GMT -4. The time now is 06:27 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy