Efficient way to read only 1st line from number of files
I am struck up with some problem. I am analyzing on an efficient way to read number of files. Actually I want to read only the first line from each of them.
There could be hundreds of them in the directory/sub-directories; but not huge in size.
Can anyone suggest a way I can do it without compromising too much on memory and performance.
Thanks in advance.