GREP not working in log file
I have a situation where there is a log file which is being written by the running application every millisecond and is of huge size.
Now i have to test something and for that i have to append some string that log file. So tried to run below command :
/> echo "my string appended" >> test.log
then i wanted to confirm that whether the string has been appended or not, so ran the below command :
/> grep "my string appended" test.log
But it returned nothing. Though as per my knowledge it should have returned the string appended.
Is it because that test.log is being written simultaneously by the application?
Is above the right approach or not?
Please correct me in my approach.
Thanks a lot in advance.