Actually, I just figured out a very sweet way of doing this ...
Doesn't
neet any complicated pattern match at all ... I just need to use 'head
-c <num>' and get the top <num> characters from a file and
then pipe it to 'tail -c <num>' to get the bottom <num>
characters.
Keeping Susan's (first) explanation in
mind (and counting 1 character extra in each <num> for each \n
the input file, the substring can be extracted from any large file very
easily!
Only that, I would have had to do some
regular expression matching if I was looking for a pattern, but I am
not looking for any in this case, and so head and tail work perfectly
fine for me!
Thanks everyone for your help! :)