The UNIX and Linux Forums  

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 files from two directories ravi214u Shell Programming and Scripting 2 07-14-2008 08:04 AM
Compare File Names in Different Directories... stky13 Shell Programming and Scripting 4 05-09-2008 05:36 PM
Compare 2 directoriesand it's sub directories anikanch UNIX for Dummies Questions & Answers 0 10-28-2005 11:24 AM
Compare 2 Directories seongyin UNIX for Dummies Questions & Answers 2 06-01-2005 01:28 PM
compare directories on two servers MizzGail Shell Programming and Scripting 1 03-25-2003 01:41 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 03-02-2009
richsark richsark is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 92
compare db zone files in 2 directories

Hi,

I am in need of a way to compare ( perhaps a shell script or Perl ) many db.X files that are located in 2 separate directories but strip out the first 11 lines from

;
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
;
; generated from:
;

and then take the SOA information from the file:

IN SOA pwedns1.internet.com. hostmaster.internet.com.

But only the SOA pwedns1.internet.com.

Then continue to the rest of the contents for each file and end before the word:


; END OF 208.116.70.0/24
;


then some how create a readable output to show what is different between all the contents of the two directories that contain the files starting with db.

I tried to use diff file1 and file2 but that gets me one file at a time and the output is not the best with < > and makes it hard to understand.

A sample of an entire db.X looks like, keep in mind some contain more information then others:

;
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
; THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT IT.
;
; generated from:
;
;

$TTL 3600

70.116.200.IN-ADDR.ARPA. IN SOA pwedns1.internet.com. hostmaster.internet.com. (
2008121203 ; Serial
900 ; Refresh
300 ; Retry
1209600 ; Expire
3600 ) ; Minimum
70.116.200.IN-ADDR.ARPA. IN NS pwedns1.internet.com.
70.116.200.IN-ADDR.ARPA. IN NS pmedns1.internet.com.



;
; END OF 200.116.70.0/24
;


Thanks in advance

Last edited by richsark; 03-02-2009 at 09:27 PM.. Reason: wording/clarify
  #2 (permalink)  
Old 03-03-2009
richsark richsark is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 92
HI everyone,

Just following up if I could get some help.
  #3 (permalink)  
Old 03-05-2009
richsark richsark is offline
Registered User
  
 

Join Date: Feb 2009
Posts: 92
Hello, sorry to nag, Is this possible for someone to create for me?
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 04:50 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