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
Register
Forum Rules
Links
Albums
FAQ
Members List
Calendar
Search
Today's Posts
Mark Forums Read
Thread
:
Displaying specific lines in a file.
View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
#
3
(
permalink
)
02-05-2008
joeyg
modérateur
Join Date: Dec 2007
Location: Home of 17-time world champion Boston Celtics
Posts: 1,311
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
Find joeyg's past nominations received
Find joeyg's present nominations given