Getting Rid of whitespace in echo command
Posted on 2004-09-23
When I execute the below command, my result comes back with a bunch of spaces before the number, how do I get rid of the spaces?
There are 5 users on the system
who | wc -l > count.dat
if [ $counter -gt 1 ]
echo "There are $counter users on the system"
elif [ $counter -eq 1 ]
echo "There are 1 users on the system"
elif [ $counter -eq 0 ]
echo "There are no users on the system"