Bash/Shell Scripts bash : Count number of recurrence of lines Posted on January 8, 2011 by Vishal Jain Using sort and uniq commands, one can count number of recurrences of records in a file.