sed command to replace char at a specific byte position
<p>I am having two files say test1 &amp; test2 having a difference at some random position.So i want to search for char position that differ in test1  from test 2 &amp; want to replace that with * in test 1 . But the constraint is without knowing the char by just knowing the position of char.
So i have tried to use the cmp -b to get the byte position that differ but cant get something in sed or any where that can replace char at a byte position or something in compare that will give line no. as well as char position in line that differ. So any help (the main constraint is that cant replace with char value as don't want that change at other places in file want change only at that position). sed first occurrence replacement will also not work as first occurence may be before the differ position. </p>