Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

File Extension Counter

DZone's Guide to

File Extension Counter

·
Free Resource
Produces a count of the frequencies of each file extension in the directories named on the command line

#!/usr/bin/perl -w
use strict;
my %exten;
foreach (@ARGV) {
 /(\.[^.]+)$/ && $exten{$1}++ foreach glob "$_/*.*"
}
print "$_: $exten{$_}\n" foreach sort keys %exten;
Topics:

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}