If the file and sections will be in the format that you posted, I have just worked out a more efficient way to do it.

Not using $readini though.

Code:
alias count_sections {
  filter -cffgx $1 sections.tmp =|]
  .remove sections.tmp
  $iif($isid,return,echo -a) $calc($filtered + 1)
}


/usage /count_sections filename.ini

Last edited by HaleyJ; 23/08/10 03:02 PM.

Newbie