And we have a winner.  Thanks for the help. 



I'm sure Larry's option would work great too - I probably just typed something 
wrong. 




----- Original Message ----- 
From: "Stuart Boydell" <stuart.boyd...@spotless.com.au> 
To: "U2 Users List" <u2-users@listserver.u2ug.org> 
Sent: Monday, October 26, 2009 7:26:05 PM GMT -06:00 US/Canada Central 
Subject: Re: [U2] Count tab characters 

tr -dc '\t' < file1 | wc -c 

Stuart Boydell 


-----Original Message----- 
From: u2-users-boun...@listserver.u2ug.org 
[mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of iggch...@comcast.net 
Sent: Tuesday, 27 October 2009 10:02 
To: u2-Users 
Subject: [U2] Count tab characters 



Hi all, 



Can anyone tell me a unix command that will count the number of tab characters 
in a unix regular file?  I'm using the wc command to return bytes, lines, etc 
but now I need to count ONLY the tabs.  For some reason, I thought grep -c 
would work for me but forgot that that only returns the number of lines that 
have a tab character.  I could open the file sequentially and count but I need 
something that is fast fast fast. 



Thanks 
_______________________________________________ 
U2-Users mailing list 
U2-Users@listserver.u2ug.org 
http://listserver.u2ug.org/mailman/listinfo/u2-users 

  
********************************************************************** 
This email message and any files transmitted with it are confidential and 
intended solely for the use of addressed recipient(s). If you have received 
this communication in error, please reply to this e-mail to notify the sender 
of its incorrect delivery and then delete it and your reply.  It is your 
responsibility to check this email and any attachments for viruses and defects 
before opening or sending them on. Spotless collects information about you to 
provide and market our services. For information about use, disclosure and 
access, see our privacy policy at http://www.spotless.com.au 
Please consider our environment before printing this email. 
********************************************************************** 

_______________________________________________ 
U2-Users mailing list 
U2-Users@listserver.u2ug.org 
http://listserver.u2ug.org/mailman/listinfo/u2-users 
_______________________________________________
U2-Users mailing list
U2-Users@listserver.u2ug.org
http://listserver.u2ug.org/mailman/listinfo/u2-users

Reply via email to