|
|
|
|
|
by ucs
3443 days ago
|
|
Tail employs a large read buffer as well, but it does not matter because you wouldn't use it in the same manner. Tail is the right tool for the job here. But if you wish to stick with your idiom, read will reliably consume a single line of input, regardless of how it is implemented: (read -r; cat) < file
|
|
This is just as inefficient as it sounds, but it doesn't matter much in practice since you rarely read a lot with it.