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 > 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
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 2 files; output diff's to 3rd file blt123 Shell Programming and Scripting 2 05-28-2002 11:29 AM

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 04-13-2005
paulp paulp is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 2
diff output

I have two CSV files and I would like to create a third CSV file containing the differences between the two.

I understand the diff command can be used to list differences between two files. My problem is that when I pipe the output into a third CSV file, the line numbers and other formatting from diff also get piped. Is there any way to pipe only the actual text?

Thanks
  #2 (permalink)  
Old 04-13-2005
RTM's Avatar
RTM RTM is offline Forum Advisor  
Hog Hunter
  
 

Join Date: Apr 2002
Location: On my motorcycle
Posts: 3,039
You might try the comm command - it may give you what you are looking for with less formating to do.
  #3 (permalink)  
Old 04-13-2005
paulp paulp is offline
Registered User
  
 

Join Date: Apr 2005
Posts: 2
Thanks

I have looked at comm but I cant get it to produce the same output as diff as it operates line by line. I was hoping the answer may lie with diff, perhaps an option. I have also been informed of uniq, but as I understand this operates on a single file only
  #4 (permalink)  
Old 04-14-2005
bhargav's Avatar
bhargav bhargav is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2004
Location: USA
Posts: 511
The following may help ...

Code:
 diff file1 file2 | grep "[<>]" | sed "s/>/\t/g;s/<//g"
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 10:43 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