#!/bin/bash for directory in "$@" do find "$directory" -name '*.*' -type f -print done | \ sed 's#^[^\.]*\.\(.*\)$#\1#' | \ histogram --percent