Leading blanks - problem
Can you please help me with the following:
# num_count=`ls /tmp/countdir |wc -l` # echo "Number of files in /tmp/countdir is ($num_count)" Number of files in /tmp/countdir is ( 5) Why do I have 7 leading blanks before number 5? How could I avoid that? Thanks! |
Quote:
Code:
num_count=`ls /tmp/countdir |wc -l` |
Quote:
typeset -i num_count ... |
Quote:
Code:
c@CW8:~$ num_count=`ls /tmp | wc -l` 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). |
All times are GMT -5. The time now is 03:04 AM. |