I think that somebody asked the list a similar question recently, but I couldn't find it. Here's the deal:<br><br>I have two files:<br>file1 - contains unique strings:<br><br>123abc<br>234xyz<br>123456<br>kljdhs<br>
etc<br><br>file2 is a huge log file with the unique numbers from file1 appearing in it multiple times. I need a script that for each unique string in file1, will replace it in file2 with XXXX. I did this on command line, but it didn't work:<br>
<br>for i in `cat file`<br>do<br>sed -e 's/'"$i"'/XXXX/g' file2 >> file3<br>done<br><br><br>Or something like that. The problem is that $i was not interpreted right. Any advice anybody? I'll take it in sed/awk/perl.<br>
<br>Thanks.<br><br clear="all">-- Asher <br>