View Single Post

   
  #6 (permalink)  
Old 02-19-2008, 09:20 PM
Loki Harfagr
 
Posts: n/a
Default Re: OT How to count occurances in a text file

Le Tue, 25 Jan 2005 16:11:07 +0100, Loki Harfagr a écrit*:

> Le Mon, 24 Jan 2005 23:24:45 -0800, buck a écrit*:
>
>> Can you please help me determine where there are unmatched quotes (")
>> in my .mailfilterrc file?
>> if count=0 then ignore # Skip zero and
>> if count<>2 then echo $LINE # two; show all others
>> done <.mailfilterrc

>
> Now, another, funny but simpler one :


and better :
# awk '{if(NF){if ((NF+1)%2){print NR "\t" NF-1 "\t" $0} }; }' FS=\" file
Reply With Quote