correct me if I’m wrong.. you want to copy to a different box if there are 
additional aliases.. and do not do anything if an alias is removed.. 

 

just use diff… get the updates just to be sure double check if the new entry if 
its already in address.txt (assuming someone reordered the entries in the 
alias)..  add the update to address.txt and rsync it.. 

 

 

 

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Nelson Serafica
Sent: Tuesday, January 29, 2008 9:17 PM
To: [email protected]
Subject: [SPAM] - [plug] shell scripts or not - Email found in subject

 

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 
<http://sg.rd.yahoo.com/mail/ph/footer/def/*http:/ph.mail.yahoo.com%20> 


--------------------------------------------------------------------------------------------------------
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.

_________________________________________________
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