A similar question like this has been asked here, but I would like something slightly different.  My issue is this, if my file foobar.txt looks like this:
ABCdefg
hijklmn
How can I search for the ABC on each line of the file, and if "ABC" is found, that entire line needs to be replaced to AAAAAAA.  So the final output of the file would be:
AAAAAAA
hijklmn
 
     
     
    