The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
comparing PID values of 2 Files in shell Options marconi Shell Programming and Scripting 2 12-19-2007 01:02 PM
Comparing two files.. padarthy Shell Programming and Scripting 1 08-29-2007 09:01 AM
comparing shadow files with real files terrym UNIX for Advanced & Expert Users 4 02-09-2007 02:38 AM
Script error.. for comparing 2 files! gkrishnag UNIX for Advanced & Expert Users 4 09-13-2006 10:19 AM
shell script comparing files in a file raina_nalin Shell Programming and Scripting 4 06-21-2005 07:00 AM

 
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
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-18-2008
prashanth.spl prashanth.spl is offline
Registered User
  
 

Join Date: Jun 2008
Posts: 2
shell script for comparing 2 files

Hi,

how to read the 2 files and compare each other in shell script? i have 2 files test1 and test2, both files contains 20 character records.we have to compare file 1 records with file2, if exists then reject the record else we have to append it to test2 file. in file test1 around 100 single column records are there. and test2 around 50000 single column records.

how can we do in shell script?

ex: test1
burningburning21sstt
ex:test2
burningburning21eett

we need to compare only first 16 letters of the record like
if test1.burningburning21 = test2.burningburning21 then reject.


Thanks in advance
 

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 08:38 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