<br><br>
<div class="gmail_quote">On Thu, Dec 3, 2009 at 12:42 PM, mark <span dir="ltr"><<a href="mailto:m.roth@5-cent.us">m.roth@5-cent.us</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT: #ccc 1px solid; MARGIN: 0px 0px 0px 0.8ex; PADDING-LEFT: 1ex" class="gmail_quote">
<div class="im">John Doe wrote:<br>> From: hadi motamedi <<a href="mailto:motamedi24@gmail.com">motamedi24@gmail.com</a>><br>>> Can you please do me favor and let me know if I can go further and try for<br>
>> advanced search like finding how many rows inside a file have data that<br>>> does not start with a zero after the third comma ?<br>><br>> Something like: awk -F, ' { print $4 } ' | grep -v "^0" | wc -l Use one<br>
> command at a time to see how they work with each other (you might have to<br>> modify the grep a bit)...<br><br></div>*sigh*<br><br>Drive me crazy, why use multiple commands?<br><br>awk -F 'BEGIN { FS = ","; }{if ( $3 !~ /^0 ) { count++; }} END { print count }'<br>
filename<br><br>       mark "why, yes, since you ask, I *have* written 100 and<br>               200 line awk scripts"<br><font color="#888888">--<br>Though I don't think (object-oriented programming) has much to offer good<br>
programmers, except in certain specialized domains, it is irresistible to<br>large organizations. Object-oriented programming offers a sustainable way<br>to write spaghetti code.  - Paul Graham<br></font>
<div>
<div></div>
<div class="h5">_______________________________________________<br>CentOS mailing list<br><a href="mailto:CentOS@centos.org">CentOS@centos.org</a><br><a href="http://lists.centos.org/mailman/listinfo/centos" target="_blank">http://lists.centos.org/mailman/listinfo/centos</a><br>
</div></div></blockquote></div>
<div><br> </div>
<div>Sorry . I tried for your proposed procedure , as the followings :</div>
<div>#awk -F 'BEGIN { FS = ","; }{if ( $3 !~ /^0 ) { count++; }} END { print count }' HLRSubscriber-20091111173349.csv</div>
<div>But my CentOS server didn't return to the prompt . Can you please let me know why it is in an end-less iterated loop ?</div>
<div>Thank you in advance</div>
<div> </div>