I'm looking to do a find and replace within a giant database dump, and it's not doing what I think should happen. I'd like to grep for my target string in the file, and then see the surrounding 8 characters or so (I might need to adjust that number, depending). How can I do that?
The reason I can't eyeball this is because there are many hundreds, if not thousands of matches. I want to get some number of characters surrounding the string, and then pipe it into
uniq or something to see why my find and replace is having unexpected behaviors.
Also, there can be multiple matches on the same line!