LQ Newbie
Registered: Jan 2013
Posts: 4
Rep:
|
Need lines with most inforamtions in them
my file is below:
1)prabhat,,"admin","","","",,,,,"",,
2)prabhat,,"admin","user","window","linux",,,,,"",,
3)shayam,,"admin","","","",,,,,"",,
4)raja,,"admin","user","window","linux",,,,,"",,
5)badam,,"admin","","","",,,,,"",,
6)devam,,"admin","user","window","linux",,,,,"",,
now i need only those rows from this files where name is associated with more roles.
ex: in 1st and 2nd rows name prabhat is same and roles are different. in o/p row 2 should come not row 1.
"" under them their are roles, 1st row contains the name.
If there is only 1 row with name then that should come under outout as well.
Code in perl/shell/awk anything would be helpful!! Thanks.
|