The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > The UNIX Forums - Contact Us > Post Here to Contact Site Administrators and Moderators
Google UNIX.COM


Post Here to Contact Site Administrators and Moderators Make Suggestions About Forums, Features, or Content here. Discuss Rules and Guidelines. Get Forum Support Here. (Registered Users Only)

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
to find numbers in a string fongthai Shell Programming and Scripting 12 11-22-2007 01:34 PM
to find numbers using awk cdfd123 Shell Programming and Scripting 1 10-02-2007 09:19 AM
how to find port numbers a web server is listening to laddu IP Networking 6 02-16-2007 06:40 AM
find 2 line numbers, grab text in between Da_Duck Shell Programming and Scripting 11 09-26-2006 09:51 AM
extracting uncommon part between two files sabyasm Shell Programming and Scripting 2 11-06-2005 10:25 AM

Reply
 
Submit Tools LinkBack Thread Tools Search this Thread Display Modes
  #1  
Old 10-31-2007
salaathi's Avatar
Registered User
 

Join Date: Sep 2007
Location: Madurai
Posts: 20
program to find the uncommon numbers between two files.

Hi,

I need to extract the uncommon numbers from file1 and file2

For Example:

File1
1
2
3
4
5

File2
1
2
3
4
5
6
7
8
9
10

If i compare this two file the output should be iam using solaris version 5.8 pls give me script which should be compatible to run in this version Thanks in advance.

output file should be
6
7
8
9
10
Reply With Quote
Forum Sponsor
  #2  
Old 10-31-2007
Registered User
 

Join Date: Mar 2007
Location: Chennai
Posts: 222
diff

A clumpsy solution,
Code:
 diff -e /tmp/f1 /tmp/f2 | sed -e '1d' -e '$d'
Assuming f1 & f2 has only the numbers

Thanks
Nagarajan G
Reply With Quote
  #3  
Old 10-31-2007
salaathi's Avatar
Registered User
 

Join Date: Sep 2007
Location: Madurai
Posts: 20
Thanks Nagarajan .neenga tamilaa
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes




All times are GMT -7. The time now is 12:04 AM.


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