#!/usr/bin/awk -f # count-files: count the number of files in each folder BEGIN { OFS = "\t" } { count[$0]++ } END { for (folder in count) { print count[folder], folder } }