Register
It is currently Thu Jul 24, 2014 2:25 am

Comparing two files and print difference to new file


All times are UTC - 6 hours


Post new topic Reply to topic  [ 3 posts ] 
Author Message
 PostPosted: Thu Jun 28, 2007 11:46 am   

Joined: Thu Jun 28, 2007 11:31 am
Posts: 2
Good day all. Could someone assist me in the following;

#!/bin/bash

FILE1="../../file.old"
FILE2="../../file.new"
FILE3="../../file.txt"

FILEDIFF='diff $FILE1 $FILE2 | tee -a $FILE3


#END

Question is why am I not getting only the new information to a file?
Thank you inadvance.


Top
 Profile  
 PostPosted: Fri Jun 29, 2007 12:17 pm   
Site Admin

Joined: Tue May 17, 2005 7:31 pm
Posts: 251
Location: Georgia
man diff wrote:
--suppress-common-lines
Do not output common lines.


Top
 Profile  
 PostPosted: Fri Jun 29, 2007 12:22 pm   

Joined: Thu Jun 28, 2007 11:31 am
Posts: 2
Thank you jbsnake. I look forward to try that out I am very grateful.


Top
 Profile  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 6 hours


Who is online

Users browsing this forum: No registered users and 7 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron


BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group
© 2003 - 2011 USA LINUX USERS GROUP