Cover Image

Count Files Lines

August 1, 2021 - Reading time: ~1 minute

Count Files Lines file by file

#!/usr/bin/env bash

for F in *
do
    if [[ -f $F ]]
    then
        echo $F: $(cat $F | wc -l)
    fi
done

Hit Counter

45