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
Formatting the output from diff ragavhere Shell Programming and Scripting 9 05-07-2008 04:40 AM
Diff output, unwanted characters scanner248 UNIX for Dummies Questions & Answers 5 10-17-2007 04:23 PM
Is there a way to limit DIFF output bobk544 Shell Programming and Scripting 2 06-08-2007 03:54 PM
parsing output from a diff command... kam Shell Programming and Scripting 5 05-29-2007 11:26 PM
diff output paulp UNIX for Dummies Questions & Answers 3 04-14-2005 02:27 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 05-23-2002
blt123 blt123 is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 18
Question diff 2 files; output diff's to 3rd file

Hello,
I want to compare two files. All records in file 2 that are not in file 1 should be output to file 3.

For example:

file 1
123
1234
123456

file 2
123
2345
23456

file 3 should have
2345
23456

I have looked at diff, bdiff, cmp, comm, diff3 without any luck!

Thanks for your help
Barbara
  #2 (permalink)  
Old 05-23-2002
Younus Younus is offline
Registered User
  
 

Join Date: May 2002
Posts: 1
comm -23 file2 file1 > file3 should get you what you are looking for.
  #3 (permalink)  
Old 05-28-2002
blt123 blt123 is offline
Registered User
  
 

Join Date: Feb 2002
Posts: 18
Smile diff 2 files; output diff's to 3rd file

Thanks for the info, it works!

When I read "man" about comm, it had mentioned the output as being "text columns". This confused me, because I wanted the different records.

Thanks again,
Barbara
Sponsored Links
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 01:36 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language translation by Google.
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