I have a text file which contains multiple paths like below
$ cat directory.txt
while read $i ;do
ls |wc -l
done < /aaaa/bbbbb/count.txt
#!/bin/bash for i in `cat /aaaa/bbbbb/directory.txt` do cd $i ls | wc -l >>/aaaa/bbbbb/count.txt done
cat the filename in special single quote. that is in tilde sign. It will be solved.