The contents of the sample.txt is as follows.
____________
aaa,bbb
ccc,ddd
____________
first line contains aaa,bbb
second line is blank
third line contains ccc,ddd
Now I need to write a script to search in the file sample.txt. If it contains blank as in second line. It have to throw the error message "invalid file" else nothing.
I have achieved this by reading line by line. But due to performance issue, I need to scan in the whole file whether it contains blank line. If so i need to throw the error message "invalid file".