I tried to come up with a thread title that was specific without being too long or cryptic. Don't think I succeeded.
In my PHP error log I keep getting this error over and over again:
Code:
EntityRef: expecting ';' at line 565, column 81
It's very odd to me that it doesn't contain any sort of stack trace or file info. I know which of my virtual hosts and therefore which directory it's coming from, and it's happened now on half a dozen different servers that this site has lived on.
So obviously I'm trying to track it down and add the missing ';' to the right file. This directory has dozens of sub-directories and hundreds of files though.
This is the best I've managed to come up with so far:
Code:
find . -type f -iname "*.php" -print -exec awk 'NR==565' {} \;
(I've run it both with and without the -iname filter.)
So I get a very large list of files, and some of them display the contents of line 565 after them. I've checked through a number of them there, but haven't found the culprit.
These are my questions:
- Is it possible to limit my "find" command to only files that have at least 565 lines?
- Is it possible to have it only print matches from line 565 that has at least 81 columns?
- How would I modify that to print perhaps 5 lines on either side (in case the error reporting is pulling a slightly different line.)
- Does anyone have any other suggestions on how I might track this thing down?
Thanks!