Quote:
Originally Posted by laki47
Why do I have 7 leading blanks before number 5?
How could I avoid that?
|
Use my system! I could not reproduce the problem:
Code:
c@CW8:~$ num_count=`ls /tmp | wc -l`
c@CW8:~$ echo "Number of files in /tmp is ($num_count)"
Number of files in /tmp is (4)
c@CW8:~$ ls /tmp | wc -l
4
What is the output of
ls /tmp/countdir |wc -l on your system?
Which shell are you using? If ksh, how have you declared num_count or is it implicitly declared as an ordinary variable?
EDIT: in ksh, to print the attributes of variable num_count try
typeset -p | grep num_count (not tested; no ksh to test on).