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

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Finding tables from each script subrat Shell Programming and Scripting 2 06-17-2008 12:39 AM
Converting tables of row data into columns of tables justthisguy Shell Programming and Scripting 7 07-16-2007 01:42 PM
How to compare the dates in shell script vaji Shell Programming and Scripting 9 02-27-2007 09:34 PM
use shell scripts to update tables from databases wannabegeek Shell Programming and Scripting 0 07-03-2006 02:27 PM
shell script cant recognize if else compare jaseloh Shell Programming and Scripting 6 12-06-2005 08:34 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-25-2008
Registered User
 

Join Date: Apr 2008
Posts: 4
compare two tables using shell script

Hi,

I want to compare two tables fieldwise using shell script. Can anyone help me regarding the same.
The approach which i tried is to first move the two tables in simple txt file where each field is now seperated by space. But i can't retrive each field with "space" as a seperator b'coz there are some fields like say "Description" which have content with spaces for ex. "[X] or more external movement" is the value in that field. Thus i cannot use space as a seperator.

Can any one help me in seperating each field and then compare that two files i.e two tables..

Thanks,
Durwas
Reply With Quote
Forum Sponsor
  #2  
Old 06-25-2008
Registered User
 

Join Date: Sep 2005
Posts: 27
There are simple database command to find the difference.

Example: if you are using oracle you can use the command:

select * from A minus select * from B;

(A and B be the table name)
...

from shell script if you want to find : you would need to think of some delimeter which doesn't occur in your table data...
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:48 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0