http://www.perlmonks.org?node_id=516615


in reply to Re^3: Counting the Extensions of the Directory
in thread Counting the Extensions of the Directory

Ok!

You are counting to everything and not each extension !?

IBIZA >ls SN10738.ksh calculo_SN10738.ksh separa_tabllama.awk SN10738.log calculo_SN10738B.ksh transferSN10738A.ksh filtroSN10738A.ksh separaVielinSN10406.ksh IBIZA >perl -e 'while(<*>){if(-f && /\.(\w+)$/){$e{$1}++}}print "$_ -> + $e{$_}\n" for keys %e' ksh -> 6 awk -> 1 log -> 1
SHELL: IBIZA >ls | cut -sf2 -d. | sort | uniq -c 6 ksh 1 awk 1 log


Mago
mago@rio.pm.org