subtract total numbers of files from 2 directories
Hello, I am storing the number in a file but the problem is that I don't know how to do the calculation from those two directories.
here is my program: echo "enter first directory name" read dir1 echo "enter second directory name" read dir2 ls $dir1 | wc -l > r ls $dir2 | wc -l > t cat r cat t #let y=r+t I had error in this part I'm stuck here :scratch: #echo y sorry for my poor english... |
Quote:
Quote:
Code:
let y=$(cat r)+$(cat t) Code:
r=$(ls dir1 | wc -l) |
thank you
It works!!!
Thanks man!!! |
All times are GMT -5. The time now is 10:48 PM. |