Re: Count regular expressions in a file

This WebDNA talk-list message is from

2007


It keeps the original formatting.
numero = 69396
interpreted = N
texte = Ki Song wrote: > I want to count the number of times "" (without quotes) is in a > file. > > I'm using this shell command into a tpl file, but it returns nothing: > > [shell]/bin/grep -c \ myfile[/shell] > > Will this not work? Something like this may work: [text]count=0[/text] [listwords words=[url][yourblockoftext][/url]] [showif [word]=[url][/url]] [text]count=[math][count]+1[/math][/text] [/showif] [/listwords] appeared [count] times! Donovan note: If you are doing this for xml debugging purposes, BBedit has a nice count words (expression) feature. -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Associated Messages, from the most recent to the oldest:

    
  1. Re: Count regular expressions in a file ( Stuart Tremain 2007)
  2. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  3. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  4. Re: Count regular expressions in a file ( Ki Song 2007)
  5. Re: Count regular expressions in a file ( Ki Song 2007)
  6. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  7. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  8. Re: Count regular expressions in a file ( Ki Song 2007)
  9. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  10. Re: Count regular expressions in a file ( Ki Song 2007)
  11. Re: Count regular expressions in a file ( Grant Hulbert 2007)
  12. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  13. Re: Count regular expressions in a file ( Ki Song 2007)
  14. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  15. Re: Count regular expressions in a file ( Ki Song 2007)
  16. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  17. Re: Count regular expressions in a file ( Ki Song 2007)
  18. Re: Count regular expressions in a file ( Ki Song 2007)
  19. Re: Count regular expressions in a file ( Donovan Brooke 2007)
  20. Re: Count regular expressions in a file ( Ki Song 2007)
  21. Count regular expressions in a file ( Ki Song 2007)
Ki Song wrote: > I want to count the number of times "" (without quotes) is in a > file. > > I'm using this shell command into a tpl file, but it returns nothing: > > [shell]/bin/grep -c \ myfile[/shell] > > Will this not work? Something like this may work: [text]count=0[/text] [listwords words=[url][yourblockoftext][/url]] [showif [word]=[url][/url]] [text]count=[math][count]+1[/math][/text] [/showif] [/listwords] appeared [count] times! Donovan note: If you are doing this for xml debugging purposes, BBedit has a nice count words (expression) feature. -- =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o DONOVAN D. BROOKE EUCA Design Center <- Web Development (specializing in eCommerce),-> <- Desktop Publishing, Print Consulting, Labels -> <-Glass Products, off-hand Classes/studio rental-> PH:>(608) 770-3822 TALK:>http://artglass-forum.com WEB:> http://www.euca.us & http://www.egg.bz =o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o=o ------------------------------------------------------------- This message is sent to you because you are subscribed to the mailing list . To unsubscribe, E-mail to: To switch to the DIGEST mode, E-mail to Web Archive of this list is at: http://webdna.smithmicro.com/ Donovan Brooke

DOWNLOAD WEBDNA NOW!

Top Articles:

Talk List

The WebDNA community talk-list is the best place to get some help: several hundred extremely proficient programmers with an excellent knowledge of WebDNA and an excellent spirit will deliver all the tips and tricks you can imagine...

Related Readings:

WebCommerce: Folder organization ? (1997) with Link i need to (1997) Sorting by date (1997) WebCat2b15MacPlugin - showing [math] (1997) Search in 2 or more catalogs (1997) [WebDNA] Apache or Nginx (2016) Need relative path explanation (1997) SSL/Document Contains NO Data (1998) Emailer Set Up (1997) [WebDNA] SETCOOKIE (2009) WC3 and SSL on NT (1998) search for non-unique question (2001) WebDNA Programming question - Help Please (2001) Solve the Problem, get the code! (2001) Two prices in shoppingcart? (1997) WebCat2b13 Mac plugin - [sendmail] and checkboxes (1997) WebTen and WebCat (1997) calculating tax rates, mail order solutions and version 2 (1997) [shownext max=?] armed (1997) Purchae error - Fixed to a degree (1997)