[LIH] printing lines having same words

anuraag chowdhry <anuraag_25-/[email protected]>
Newsgroups gmane.user-groups.linux.india.help
Message-ID <[email protected]>
Hi,

How can i refer the  second field of a line , I need
to filter out those lines in which the second field is
same .

The second field can be anything , it is not fixed ,
like the example file is like:

0001:1947:a:b:c:g:h
0001:19471:g:h:j:l:o
0001:1947:g:e:f:n:h

for example I want to print the first and third lines
, as the second field is same i.e 1947.

but the value of second field is not known , just that
the second field is same .

How can I parse that type of file.

Br//
Anuraag. 


      

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.