To my knowledge, there is no standard integration in Home Assistant that lets you read a specific line from a file.
However, it’s possible to create a python_script to read a file and return whatever information you want.
Here’s an example created by VDRainer that gets all lines from a file and returns them as attributes of a sensor. Once that’s done, the information within the attributes is easily accessible to any template for further processing.
NOTE
If you want to discuss that way of retrieving data, you should start a new topic.