Does anyone know of a simple one liner to read the first line of a file in bash?
|
feedback
|
Same result as the other answers but faster because it doesn't spawn any process, as "read" is a built-in bash command. | |||
|
feedback
|
Stores the line in a variable for later use (note the inverted apostrophes). | |||||||||||||||||
feedback
|
| |||
feedback
|