Page 1 of 1

Find_53.13 unable to find the very last word

Posted: Tue Feb 18, 2014 2:17 pm
by AlexBene
================================================================================
Find 53.13 (24/11/12)
================================================================================
Report_2014.02.17.0002_Find_53.13
By: Alexander Benedictov
[email protected]
================================================================================
Find 53.13 cannot find the very last word in a file

Search 52.1 (09/12/06) does find that word in a file.
================================================================================
For example, please copy this file to RAM:T and
try to find that file by the very last word using
Find and Search.
================================================================================
Abracadabra

Re: Find_53.13 unable to find the very last word

Posted: Tue Feb 18, 2014 11:20 pm
by nbache
It works here, using my public (non-beta) installation with the same versions as yours:

Code: Select all

$ echo >T:Testfile "This is a test of finding the last word."
$ echo >>T:Testfile "The last word in the last line."
$ search T: line quick
RAM Disk:T/Testfile
     2 The last word in the last line.
$ find T: contents line
Testfile                        73 ----rwed 18/02-2014 23:07:09 T: 
$ search T: line. quick
RAM Disk:T/Testfile
     2 The last word in the last line.
$ find T: contents line.
Testfile                        73 ----rwed 18/02-2014 23:07:09 T: 
$ version `which search` file full
Search 52.1 (09/12-2006)
$ version `which find` file full
Find 53.13 (24/11-2012)
$ 
As you can see, I even tried searching both with and without the final full stop.

In all cases, the file is found.

Anything I have overlooked that we are doing differently?

Best regards,

Niels

Re: Find_53.13 unable to find the very last word

Posted: Tue Feb 18, 2014 11:57 pm
by tonyw
It may be that the last line in the file (or the only line) is not terminated with a NL. I have noticed some applications like NotePad (and its derivatives) can not find a string on the last line unless the last line has a NL character.

Re: Find_53.13 unable to find the very last word

Posted: Wed Feb 19, 2014 12:27 am
by nbache
Bingo - that's it!

I just repeated the above test, but with an added NOLINE on the second echo statement.

This showed the issue perfectly; Seach could find the file, but Find couldn't.

I have now made a BZ entry for this.

Thanks for reporting, AlexBene! (And Tony for the hint ;-)).

Best regards,

Niels