From: hrishy (hrishys at domain yahoo.co.uk)
Date: Wed 01 Aug 2001 - 09:45:55 IST
Hi kevin
lets say the file st.txt contains
components not found/ident desc
---------------------------------------------
label | not found
report | not found
label | identical
now i want the count of lables which are not found
only.
in st.txt the count should be 1.
can we do some shell script for this??
regards
hrishy
P.S:i work for free i can share my food with you
......
i dont earn much i am only 19
perl -ne 'if (/not found/) {s/^[\w]*
> |.*/\1/;$s{$1}++} END {foreach $s (sort(keys(%s)))
> {print "$s{$s} $s not found.\n"}
--- kevin lyda <kevin at domain suberic.net> wrote: > On Wed,
Aug 01, 2001 at 09:13:38AM +0100, hrishy
> wrote:
> > Helloi have a text file with the following feilds
> >
> > components not found/ident desc
> > ---------------------------------------------
> > label | not found
> > report | not found
> > label |not found
> > i would like to have a count of all not found
> > by components........
>
> uh. by any chance can i get part of your grade
> and/or salary?
>
> perl -ne 'if (/not found/) {s/^[\w]*
> |.*/\1/;$s{$1}++} END {foreach $s (sort(keys(%s)))
> {print "$s{$s} $s not found.\n"}}'
>
> kevin
>
> --
> kevin at domain suberic.net simple four line sigs -
> fork()'ed on 37058400 bandwidth friendly; nice
> to do.
> meatspace place: work some admins clueless.
> http://suberic.net/~kevin --netiquette
> haiku 2001
____________________________________________________________
Do You Yahoo!?
Get your free at domain yahoo.co.uk address at http://mail.yahoo.co.uk
or your free at domain yahoo.ie address at http://mail.yahoo.ie
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:25 GMT