The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Compare 2 flat files ganesh123 Shell Programming and Scripting 5 03-16-2007 02:04 PM
How to compare data in two flat files and update them? rajus19 Shell Programming and Scripting 3 11-08-2005 11:13 AM
Compare data in 2 files and delete if file exist lweegp Shell Programming and Scripting 3 10-13-2005 06:35 AM
Compare data files ithomp Shell Programming and Scripting 1 06-15-2004 10:08 AM
processing data in a flat file wolkott Shell Programming and Scripting 4 01-27-2003 01:57 PM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 01-29-2006
jtshashidhar jtshashidhar is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 2
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
  #2 (permalink)  
Old 01-29-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
diff yesterdays.file todays.file
  #3 (permalink)  
Old 01-29-2006
jtshashidhar jtshashidhar is offline
Registered User
  
 

Join Date: Jan 2006
Posts: 2
HI,

The diff command will list both the file content indicating where exactly the data are changed or there is a difference. By this data we need to format and getonly the changed data in second file, can you let me know how to do it

With regds
Shashi
  #4 (permalink)  
Old 01-29-2006
Perderabo's Avatar
Perderabo Perderabo is offline Forum Staff  
Unix Daemon
  
 

Join Date: Aug 2001
Location: Ashburn, Virginia
Posts: 9,111
diff yesterdays.file todays.file | grep "^>"
Sponsored Links
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 05:44 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0