You can use awk or a combination of head and tail in a shell script. awk: awk 'NR==2 {print}' filename
shell: head -2 filename | tail -1 Juan On Fri, 9 Aug 2002, [iso-8859-1] cana rich wrote: > Date: Fri, 9 Aug 2002 17:38:52 +0200 (CEST) > From: "[iso-8859-1] cana rich" <[EMAIL PROTECTED]> > Reply-To: [EMAIL PROTECTED] > To: [EMAIL PROTECTED] > Subject: HowTo : Extract the second line from a file > > > Hello, > I have a file which contain : > 172.50.47.12 > toto > titi > ... > and i would like to extract the second line (toto) > How can i do it ? > Thanks for your help > Canarich > > > > --------------------------------- > Yahoo! Mail -- Une adresse @yahoo.fr gratuite et en français ! > -- redhat-list mailing list unsubscribe mailto:[EMAIL PROTECTED]?subject=unsubscribe https://listman.redhat.com/mailman/listinfo/redhat-list