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