[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: List out

From: Allodoxaphobia
Subject: Re: List out
Date: 15 Feb 2016 18:12:37 GMT
User-agent: slrn/1.0.2 (FreeBSD)

On Mon, 15 Feb 2016 08:19:37 -0500, Greg Wooledge wrote:
> On Sun, Feb 14, 2016 at 03:02:58AM +0000, Allodoxaphobia wrote:
>> err... uhhhh... What's your *bash bug* ???
> I think what he meant to say is, "Questions of this type should be
> sent to address@hidden instead of address@hidden"
> Now... you've been given a Python solution, and I could write one in
> Tcl or Perl as well.  Using pure bash for this task would be an utterly
> poor choice, for performance reasons.
> The closest thing to a pure bash answer you can get, that would actually
> be viable in real life, would be one using awk.
> awk '
>   {
>     n=0
>     label=$2
>     for (i=3; i<=NF; i++) {
>       if ($i == "NA") n++
>     }
>     print NR ".", label, n
>   }
> ' "$file"

Remeber to _always_ reply to homework assignments with 
the most advanced and obscure solutions so as to make 
the teacher/professor say "WHAT THE HELL...?!?!?!"

reply via email to

[Prev in Thread] Current Thread [Next in Thread]