I am trying to do something like this:
if [ $(wc -l $f) -lt 2 ]
where $f is a file. When I run this, I get the error message:
[: too many arguments
Does anybody know how to fix this line in my command?
The full script is:
for f in *.csv
do
if [ $(wc -l $f) -lt 2 ]
then
echo $f
fi
done