>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?
>robert canary

        cat /proc/cyclades | egrep -w "^8"

Will grab any line that STARTS with an 8.  If there is a space after the
8, you can then use "^8 " to keep line 88 or 888, etc. from being found.

MB
-- 
e-mail: [EMAIL PROTECTED]
    Bart: Hey, why is it destroying other toys?  Lisa: They must have
    programmed it to eliminate the competition.  Bart: You mean like
    Microsoft?  Lisa: Exactly.  [The Simpsons - 12/18/99]
Visit - URL:http://www.vidiot.com/  (Your link to Star Trek and UPN)


-- 
To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe"
as the Subject.

Reply via email to