I have a problem when using diff.

I have alias.1 and alias.2 If I input an email add to alias.1, diff can 
recognize it and output it to other text file (addresses.txt) using redirector 
(>) and awk to filter unwanted characters. Same goes to alias.2

But when I remove an email add to alias.1 or alias.2, diff also recognize it 
and redirect it to addresses.txt which would have duplicate records.

Is there a parameters in diff where I can avoid this?


@Glennix glennix

May I see the code? This would really help. Email me personally.

Thanks!


----- Original Message ----
From: "[EMAIL PROTECTED]" <[EMAIL PROTECTED]>
To: [email protected]
Sent: Thursday, January 31, 2008 10:41:10 AM
Subject: Re: [plug] [SPAM] - Re: shell scripts or not - Email found in subject




 
 


<!--
 _filtered {font-family:Wingdings;panose-1:5 0 0 0 0 0 0 0 0 0;}
 _filtered {font-family:"Cambria Math";panose-1:2 4 5 3 5 4 6 3 2 4;}
 _filtered {font-family:Calibri;panose-1:2 15 5 2 2 2 4 3 2 4;}
 _filtered {font-family:Tahoma;panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;margin-bottom:.0001pt;font-size:12.0pt;font-family:"Times 
New Roman", "serif";}
a:link, span.MsoHyperlink
        {color:blue;text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:purple;text-decoration:underline;}
p
        {margin-right:0in;margin-left:0in;font-size:12.0pt;font-family:"Times 
New Roman", "serif";}
span.EmailStyle18
        {font-family:"Calibri", "sans-serif";color:#1F497D;}
.MsoChpDefault
        {}
 _filtered {margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {}
-->






There are always a lot of ways to skin a cat… hehehe but bash is
enough for the job.. anyway whatever makes you happy J
 

  
 







From:
[EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Glennix glennix

Sent: Wednesday, January 30, 2008 9:36 PM

To: Philippine Linux Users' Group (PLUG) Technical Discussion List

Subject: [SPAM] - Re: [plug] shell scripts or not - Email found in
subject
 







  
 

hi!



i figured perl would be great for this. 

 

my idea:



first off is to create a copy of ur aliases. if u'r using an aliases file,
create a copy of it.

then compare the size of ur original copy with the actual aliases file from
time to time. if the actual aliases file is <= than ur copy, then u don't
move a muscle. if it's >, then compare it line by line, and get the lines
that aren't in ur copy and append it to addess.txt. 



tell me if u want code and i'll send it to ur personal mail. 



hth. 



Nelson Serafica <[EMAIL PROTECTED]> wrote:
 







I need to create a script where if there are
new alias created, it will dump to a file called address.txt. I use diff. rsync
the alias file every 5 mins and compare the new one to the old one. (e.g. rsync
from 10:15AM will be compare to rsync from 10:10AM using diff). It works but if
there are removed email address, it will dump that email address address.txt
which I don't want to happen.



Can diff recognize the new added text and removed text? Or do I need to use
other language? Or there are other commands similar to diff? I tried a create
script as simple as possible that's why I'm using bash.




 










  
 








Tired
of spam? Yahoo! Mail has the best spam protection around

http://ph.mail.yahoo.com_________________________________________________

Philippine Linux Users' Group (PLUG) Mailing List

[email protected] (#PLUG @ irc.free.net.ph)

Read the Guidelines: http://linux.org.ph/lists

Searchable Archives: http://archives.free.net.ph
 

  
 

  
 








Looking for last minute shopping deals? Find
them fast with Yahoo! Search.
 







-----------------------------------------------------------------------------
This message and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom it is
addressed. It may contain sensitive and private proprietary or legally
privileged information. No confidentiality or privilege is waived or
lost by any mistransmission. If you are not the intended recipient,
please immediately delete it and all copies of it from your system,
destroy any hard copies of it and notify the sender. You must not,
directly or indirectly, use, disclose, distribute, print, or copy any
part of this message if you are not the intended recipient. 
FXDirectDealer, LLC reserves the right to monitor all e-mail 
communications through its networks. Any views expressed in this 
message are those of the individual sender, except where the 
message states otherwise and the sender is authorized to state them.

Unless otherwise stated, any pricing information given in this message
is indicative only, is subject to change and does not constitute an
offer to deal at any price quoted. Any reference to the terms of
executed transactions should be treated as preliminary only and subject
to our formal confirmation. FXDirectDealer, LLC is not responsible for any
recommendation, solicitation, offer or agreement or any information
about any transaction, customer account or account activity contained in
this communication.




-----Inline Attachment Follows-----

_________________________________________________
Philippine 
Linux 
Users' 
Group 
(PLUG) 
Mailing 
List
[email protected] 
(#PLUG 
@ 
irc.free.net.ph)
Read 
the 
Guidelines: 
http://linux.org.ph/lists
Searchable 
Archives: 
http://archives.free.net.ph






      
____________________________________________________ 
Tired of spam? Yahoo! Mail has the best spam protection around 
http://ph.mail.yahoo.com 
_________________________________________________
Philippine Linux Users' Group (PLUG) Mailing List
[email protected] (#PLUG @ irc.free.net.ph)
Read the Guidelines: http://linux.org.ph/lists
Searchable Archives: http://archives.free.net.ph

Reply via email to