The UNIX and Linux Forums
>
Top Forums
>
UNIX for Dummies Questions & Answers
Displaying specific lines in a file.
User Name
Remember Me?
Password
Google UNIX.COM
Forums
Portal
Register
Forum Rules
FAQ
Contribute
Members List
Arcade
Search
Today's Posts
Mark Forums Read
Thread
:
Displaying specific lines in a file.
View Single Post in UNIX Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
02-05-2008
joeyg
premier etoile de match
Join Date: Dec 2007
Location: Home of world champion Boston Celtics
Posts: 625
using heads and tails...
> cat f1
line 1
line 2
line 3
line 4
line 5
> head -3 f1 | tail -1
line 3
>
in essence, finding the first three lines of a file, then selecting the last line of what I just found.
joeyg
View Public Profile
Find all posts by joeyg