Help me using sed

Hi ,

I have this record as output of my script but i want it to filter more so as not to display those records/lines that has lesser than 10.

here is the sample record:

Feb 24 abraham     60.191.95.78  =  2
Feb 24 andrea     60.191.95.78  =  2
Feb 24 page     60.191.95.78  =  2
Feb 24 magenta     60.191.95.78  =  2
Feb 24 user     60.191.95.78  =  22
Feb 24 clemence     60.191.95.78  =  10
Feb 24 cvsroot     60.191.95.78  =  4
Feb 24 richard     210.83.161.213  =  2
Feb 24 kaitlyn     60.191.95.78  =  11
Feb 24 allan     60.191.95.78  =  2
Feb 24 guest     60.191.95.78  =  20
Feb 24 taylor     60.191.95.78  =  11
Feb 24 abigail     60.191.95.78  =  12
Feb 24 ana     60.191.95.78  =  10
Feb 24 jasmine     60.191.95.78  =  11
Feb 24 paulette     60.191.95.78  =  10
Feb 24 bind     60.191.95.78  =  2
Feb 24 squirrelmail     60.191.95.78  =  3
Feb 24 allison     60.191.95.78  =  40
Feb 24 cecile     60.191.95.78  =  20
Feb 24 nath     60.191.95.78  =  45
Feb 24 gamma     60.191.95.78  =  2
Feb 24 aaron     60.191.95.78  =  2
Feb 24 emma     60.191.95.78  =  11
Feb 24 love     60.191.95.78  =  2
Feb 24 avery     60.191.95.78  =  10
Feb 24 setup     75.73.173.60  =  2
Feb 24 joan     75.73.173.60  =  2
Feb 24 luce     60.191.95.78  =  10
Feb 24 alpha     60.191.95.78  =  2
Feb 24 chantal     60.191.95.78  =  110
Feb 24 horde     60.191.95.78  =  2
Feb 24 username     210.83.161.213  =  2
Feb 24 obelix     60.191.95.78  =  3
Feb 24 constance     60.191.95.78  =  15

Anyone can help me on this ?

use awk:

awk '$NF>=10{print}' file

cheers,
Devaraj Takhellambam

awk -F"=" '{if ( $2 <= 10 ) print $1 $2 }' filename
 sed -n '/\=\s*[0-9][0-9][0-9]*$/p' abc.txt

HTH,
PL

We can also do the parsing by this way.

sed -nr '/\=\s*[0-9]{2,}$/p' <inputfilename>

Whew,

Thanks to all. I'll appreciate all your replies.

May i know how can I earn on this forum ?

:slight_smile:

Did you mean learn or earn?

I mean earn since i'm just curious if the no. of posts you have can be converted into cash ?

or the members here are just too generous to share their knowlegde ?

:slight_smile:

We are here for just helping you only.This Forums isn't for earing.

Thanks...

More power in this forum. It helps a lot.