How to get the first line of a file in a bash script?

Posted by Neuquino on Stack Overflow See other posts from Stack Overflow or by Neuquino
Published on 2010-03-13T18:56:13Z Indexed on 2010/03/13 19:05 UTC
Read the original article Hit count: 258

Filed under:

I have to put in a bash variable the first line of a file. I guess it is with the grep command, but it is any way to restrict the number of lines?

Thanks in advance

© Stack Overflow or respective owner

Related posts about bash