I have multiple text files in a directory and want to compare line count for each file against each other.
Below is my code but the output is incorrect; it's always showing me "bigger" whatever the line count.
for f in *.txt; do
for f2 in *.txt; do
if [ "wc -l $f" > "wc -l $f2" ]; then
echo bigger;
fi;
done;done
I'm not sure if this part if [ "wc -l $f" > "wc -l $f2" ]
is correct.