
January 15th, 2013, 05:05 PM
|
|
|
Instead of:
Code:
tput cup 3 50; ls -a | awk '!/^d/{print}' | wc -l
and
Code:
tput cup 4 50; ls -l | awk '!/^d/{print}' | wc -l
Use:
Code:
numa=$(ls -a | awk '!/^d/{print}' | wc -l)
tput cup 3 50 echo $numa
and
Code:
numl=$(ls -a | awk '!/^d/{print}' | wc -l)
tput cup 3 50; echo $numl
numt=$(( numa + numl))
Then do an echo at the relevant location of $numt
__________________
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
|