On Mon, Dec 08, 2003 at 04:15:18PM +0200, Dan Andrei Nestor wrote:
> cum draq pot sa numar de cate ori apare un anumit cuvant intr-un fisier?
> problema e de fapt pe un AIX, da' ma descurc eu si cu un hint de linux.
> 10x.
Are perl?
[EMAIL PROTECTED]:~$ echo -e 'string stringb a a\na stringa a' | perl -e
'while(<STDIN>) {/^.*?(string(?{$nr++}).*?)*$/} print "$nr\n"'
3
Sigur se poate face si mai elegant, dar asta mi-a venit acum in minte :-P
--
Birzan George Violence is the last refuge of
Cristian the incompetent -- Salvor Hardin
---
Detalii despre listele noastre de mail: http://www.lug.ro/