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
Finding tables from each script subrat Shell Programming and Scripting 2 06-17-2008 03:39 AM
Converting tables of row data into columns of tables justthisguy Shell Programming and Scripting 7 07-16-2007 04:42 PM
How to compare the dates in shell script vaji Shell Programming and Scripting 9 02-28-2007 12:34 AM
use shell scripts to update tables from databases wannabegeek Shell Programming and Scripting 0 07-03-2006 05:27 PM
shell script cant recognize if else compare jaseloh Shell Programming and Scripting 6 12-06-2005 11:34 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 06-25-2008
dtidke dtidke is offline
Registered User
  
 

Join Date: Apr 2008
Posts: 5
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
  #2 (permalink)  
Old 06-25-2008
sabyasm sabyasm is offline
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...
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 11:47 AM.


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