I am assuming you just want the lines that begin with 8.
grep "^8 " /proc/whatever
The ^ represents the beginning of the line. FYI, $ is the end of the line.
these are both part of the "regular expression" syntax.
Carl
----- Original Message -----
From: Robert Canary <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, January 29, 2000 4:58 PM
Subject: [OffTopic] egrepping a text file
> Hi,
>
> This is really a silly question, but ...........
>
> I need to extract a single line from a /proc file. The lines are sorted
> by the first column, which are always 0,1,2,3,4,...,60,61,62,63,64. I
> treid doing something like:
> cat /proc/cyclades | egrep -w "8" but it returns *every* line with an
> 8. How can I do this without going through a loop?
>
> Thanks in advance ;-)
>
> --
> robert canary
> system services
> OhioCounty.Net
> [EMAIL PROTECTED]
> (270)298-9331 Office
> (270)298-7449 Fax
>
>
>
> --
> To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
> as the Subject.
>
--
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.