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,161 of 42,547   
   Herbert Kleebauer to Maxmillian   
   Re: Lower case and diff two text files c   
   24 Mar 23 01:49:46   
   
   XPost: alt.comp.os.windows-10, alt.comp.microsoft.windows   
   From: klee@unibwm.de   
      
     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)   
      
   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