I need to count the number of lines in x files and compare which has more.The one I've done only takes two files and compares them. Any idea how to make it x amount of files?echo Enter the filename read fnecho Enter another file read fn1for WORD in $(cat $fn) do        echo $WORD done | wc -lfor WORD in $(cat $fn1) do        echo $WORD done | wc -lif (cat $fn | wc -l > cat $fn1 | wc -l) then        echo First file has more lines than second file else if (cat $fn1 | wc -l > cat $fn | wc -l) then        echo Second file has more lines than first file.fi
Count number of lines in files then compare which has more (BASH)
bash;text processing