#!/bin/csh # this shellscript checks the files alliance_all.TXT, alliance_other.TXT, # and subs_all.TXT for duplicate/erroneous records. # # in the case of alliance dupes, we are looking to see if email addys # that appear in alliance_all.TXT also appear in alliance_other.TXT. # this means that the alliance member has more than one record in the database. # # in the case of subscriber dupes, we simply check to see if a given email # address appears more than one time in the subscriber list. # note that an email address may appear more than once in the list if a # subscriber has multiple overlapping subscriptions, which is still a problem. # # ALLIANCE DUPES # cd /usr/home/cwadmin/lists/ set datecode = `date "+%Y%m%d"` sort alliance_all.TXT > alliance_all_sort.TXT uniq alliance_all_sort.TXT > alliance_all_uniq.TXT sort alliance_other.TXT > alliance_other_sort.TXT uniq alliance_other_sort.TXT > alliance_other_uniq.TXT comm -12 alliance_all_uniq.TXT alliance_other_uniq.TXT > alliance_dupes_$datecode.txt set count = `wc -l alliance_dupes_$datecode.txt` mutt -s "dupes: $count" -a alliance_dupes_$datecode.txt agolub@changewave.com < /dev/null mail -s "dupes mailed! $count" mdalius@changewave.com < /dev/null # # SUBSCRIBER DUPES # sort subs_all.TXT > subs_all_sort.TXT uniq -d subs_all_sort.TXT > subs_dupes_$datecode.txt set count = `wc -l subs_dupes_$datecode.txt` mutt -s "dupes: $count" -a subs_dupes_$datecode.txt manderson@changewave.com < /dev/null mail -s "dupes mailed! $count" mdalius@changewave.com < /dev/null # # CLEANUP # rm -f *_sort.TXT rm -f *_uniq.TXT #!/bin/csh # this shellscript downloads all the lists which are generated # automatically by MSAS each night (any reports in Info Central/Auto Export). # the lists are downloaded, and then formatting perlscripts # format the lists and mail them, as appropriate, to GIS for loading. set datecode = `date -v-1d "+%Y%m%d"` cd /usr/home/cwadmin/lists/ mv tilforbid_a.TXT tilforbid_a_check.TXT mv tilforbid_b.TXT tilforbid_b_check.TXT mv tilforbid_c.TXT tilforbid_c_check.TXT mv tilforbid_d.TXT tilforbid_d_check.TXT mv tilforbid_e.TXT tilforbid_e_check.TXT mv tilforbid_f.TXT tilforbid_f_check.TXT mv tilforbid_g.TXT tilforbid_g_check.TXT mv welcomes_0004_$datecode.txt welcomes_0004_check.TXT mv welcomes_0009_$datecode.txt welcomes_0009_check.TXT mv welcomes_0010_$datecode.txt welcomes_0010_check.TXT # # DOWNLOAD ALL LISTS FROM SERVER # touch lists.ftp echo "open alliance-a.changewave.com" > lists.ftp echo "quote user cwadmin" >> lists.ftp echo "quote pass ender-11" >> lists.ftp echo "cd MSASFTP" >> lists.ftp echo "mget *.TXT" >> lists.ftp echo "close" >> lists.ftp echo "quit" >> lists.ftp ftp -inv < lists.ftp # # PERFORM LIST FORMATTING # # --- ProTrader lists --- # cat CWPT_paid_email.TXT CWPT_paid_altemail.TXT CWPT_comp_email.TXT CWPT_comp_altemail.TXT > CWPT_email.txt cat CWPT_paid_pda-email.TXT CWPT_comp_pda-email.TXT > CWPT_pda.txt rm -f CWPT_paid* rm -f CWPT_comp* # --- Subscriber lists --- # cat CWI_email.TXT CWI_altemail.TXT CWI_alliance.TXT > CWI_all.txt echo "gtucker@changewave.com|33" >> CWI_all.txt echo "cwachtelhausen@changewave.com|33" >> CWI_all.txt echo "mdalius@changewave.com|33" >> CWI_all.txt #rm -f CWI_email.TXT #rm -f CWI_altemail.TXT #rm -f CWI_alliance.TXT # --- Hedge Fund Briefing lists --- # cat CWHF_paid.TXT CWHF_trial.TXT > CWHF_all.txt echo "gtucker@changewave.com|33" >> CWHF_all.txt echo "cwachtelhausen@changewave.com|33" >> CWHF_all.txt echo "mdalius@changewave.com|33" >> CWHF_all.txt #rm -f CWHF_paid.TXT #rm -f CWHF_trial.TXT # --- DMO List --- # echo "gtucker@changewave.com|33" >> DailyMarket_email.TXT echo "cwachtelhausen@changewave.com|33" >> DailyMarket_email.TXT echo "mdalius@changewave.com|33" >> DailyMarket_email.TXT #rm -f CWHF_paid.TXT #rm -f CWHF_trial.TXT # --- Insight lists --- # cat CWIB_active.TXT CWIC_active.TXT CWIP_active.TXT CWIT_active.TXT > CWIN_all.txt echo "mdalius@changewave.com|33" >> CWIN_all.txt echo "kgerdes@changewave.com|33" >> CWIN_all.txt echo "tericson@changewave.com|33" >> CWIN_all.txt echo "ddurham@changewave.com|33" >> CWIN_all.txt echo "mshulman@changewave.com|33" >> CWIN_all.txt # --- Eseminar lists --- # cat eseminar_2_html* > eseminar_200.txt cat eseminar_2_text* > eseminar_201.txt cat eseminar_3_html* > eseminar_300.txt cat eseminar_3_text* > eseminar_301.txt cat eseminar_4_html* > eseminar_400.txt cat eseminar_4_text* > eseminar_401.txt #rm -f eseminar_?_html* #rm -f eseminar_?_text* # --- Tilforbid lists --- # set tilforbid_seed_mark_a = '"TestMark","mdalius@changewave.com","702984","TA-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_b = '"TestMark","mdalius@changewave.com","702984","TB-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_c = '"TestMark","mdalius@changewave.com","702984","TC-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_d = '"TestMark","mdalius@changewave.com","702984","TD-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_e = '"TestMark","mdalius@changewave.com","702984","TE-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_f = '"TestMark","mdalius@changewave.com","702984","TF-DATECODE-B","08282001","00070902"' set tilforbid_seed_mark_g = '"TestMark","mdalius@changewave.com","702984","TG-DATECODE-B","08282001","00070902"' set tilforbid_seed_nick_a = '"TestNick","nmoccia@changewave.com","702986","TA-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_b = '"TestNick","nmoccia@changewave.com","702986","TB-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_c = '"TestNick","nmoccia@changewave.com","702986","TC-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_d = '"TestNick","nmoccia@changewave.com","702986","TD-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_e = '"TestNick","nmoccia@changewave.com","702986","TE-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_f = '"TestNick","nmoccia@changewave.com","702986","TF-DATECODE-B","08282001","00070903"' set tilforbid_seed_nick_g = '"TestNick","nmoccia@changewave.com","702986","TG-DATECODE-B","08282001","00070903"' echo $tilforbid_seed_mark_a >> tilforbid_a.TXT echo $tilforbid_seed_nick_a >> tilforbid_a.TXT echo $tilforbid_seed_mark_b >> tilforbid_b.TXT echo $tilforbid_seed_nick_b >> tilforbid_b.TXT echo $tilforbid_seed_mark_c >> tilforbid_c.TXT echo $tilforbid_seed_nick_c >> tilforbid_c.TXT echo $tilforbid_seed_mark_d >> tilforbid_d.TXT echo $tilforbid_seed_nick_d >> tilforbid_d.TXT echo $tilforbid_seed_mark_e >> tilforbid_e.TXT echo $tilforbid_seed_nick_e >> tilforbid_e.TXT echo $tilforbid_seed_mark_f >> tilforbid_f.TXT echo $tilforbid_seed_nick_f >> tilforbid_f.TXT echo $tilforbid_seed_mark_g >> tilforbid_g.TXT echo $tilforbid_seed_nick_g >> tilforbid_g.TXT rm -f error.txt touch error.txt diff -s tilforbid_a.TXT tilforbid_a_check.TXT >> error.txt diff -s tilforbid_b.TXT tilforbid_b_check.TXT >> error.txt diff -s tilforbid_c.TXT tilforbid_c_check.TXT >> error.txt diff -s tilforbid_d.TXT tilforbid_d_check.TXT >> error.txt diff -s tilforbid_e.TXT tilforbid_e_check.TXT >> error.txt diff -s tilforbid_f.TXT tilforbid_f_check.TXT >> error.txt diff -s tilforbid_g.TXT tilforbid_g_check.TXT >> error.txt diff -s welcomes_0004.TXT welcomes_0004_check.TXT >> error.txt diff -s welcomes_0009.TXT welcomes_0009_check.TXT >> error.txt diff -s welcomes_0010.TXT welcomes_0010_check.TXT >> error.txt mail -s "mail list upload results" mdalius@changewave.com < error.txt # # PERFORM LIST UPLOADING # # --- ProTrader, Subscriber, WaveWire lists --- # ./upload_lists.pl # --- EOF --- #