I have downloaded a web source page to a file. I then egrep a single word to extract a line containing it to another file.
I then cat the second file and remove everything before a word and after a second word to capture the phrase desired.
This did not work. I used vi to validate that the 2 search words existed in the extracted (second) file.
To test I inserted XXXX and YYYY in the second file and used those words as sed extractions terms instead of the terms contained which I originally searched on. That works.
Can someone explain/suggest what might be in the extracted file (#2) that is fiddling my search? Here is how I did it:
egrep "seconds" /tmp/wget_saved_file > /tmp/tstfil
[used vi to insert XXXX & YYYY into tstfil]
cat /tmp/tstfil | sed 's/.*XXXX//;s/YYYY.*$//' #<<--works
Is there perhaps something about text contained in a source file that prevents it from being used as search terms?