home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   alt.msdos.batch      Fun with MS-DOS batch files      42,547 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 42,174 of 42,547   
   Herbert Kleebauer to Herbert Kleebauer   
   Re: Lower case and diff two text files c   
   27 Mar 23 13:48:10   
   
   XPost: alt.comp.os.windows-10, alt.comp.microsoft.windows   
   From: klee@unibwm.de   
      
   On 24.03.2023 14:20, Herbert Kleebauer wrote:   
   > On 24.03.2023 01:49, Herbert Kleebauer wrote:   
   >>    23.03.2023 19:31, Maxmillian wrote:   
   >>> I have two long lists of email addresses in Windows 10 as text files.   
   >>>   
   >>> How can I lowercase everything and then get a diff of what email   
   >>> addresses are in one text file but not in the other text file?   
   >>   
   >> Because you posted in alt.msdos.batch, here a batch solution:   
   >>   
   >> @echo off   
   >>   
   >> :: list all email addresses which are not in both   
   >> :: input files (email1.txt, email2.txt)   
   >>   
   >   
   > Sorry, this code doesn't work at all. Was to late yesterday,   
   > but I wanted to try the idea of reading more input files   
   > at the same time (was presented many years ago in a.m.b.nt).   
   > Better use a small C program.   
      
   Because I don't like unfinished tasks, here a version which   
   should work:   
      
   @echo off   
      
   :: list all email addresses which are not in both   
   :: input files (email1.txt, email2.txt)   
      
   if [%1]==[sub] goto :sub   
   sort email1.txt|find "@" >email1s.txt   
   sort email2.txt|find "@" >email2s.txt   
   cmd /c %0 sub   
   del email1s.txt   
   del email2s.txt   
   goto :eof   
      
   :sub   
   setlocal EnableDelayedExpansion   
      
   3

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca