osx bash grep - finding search terms in a large file with one single line
- by unsynchronized
Is there simple unix command line i can enter which lets me isolate say 512 bytes either side of a search term, even if there is only one "line" in a very large text file?
Ok, this should be easy.
Famous last words.
I'm not that familiar with grep, but it seems it is mainly used to filter out lines in the input that contain search terms.
I have a very large json file that I downloaded that i want to search for a particular term.
before you click the link - it's over 244MB so be warned - it is from
the internet wayback machine and contains lists of zip files of archived photos. i am trying to find mine.
Their web interface is broken, so i found the json file that they make public here - it's the last one on the list.
when i grep looking for my username, it finds it, but proceeds to dump that line to the console. the problem is that line is 244MB long, and it's the only line in the file.
i tried using less, but could not get that to do much - it's very slow, and seems to have the same issue.
is there simple unix command line i can enter which lets me isolate say 512 bytes either side of a search term?