The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com




View Single Post in the UNIX and Linux Forums - Click on the Thread or Permalink to View Entire Thread -->
  #1 (permalink)  
Old 08-29-2008
grumm3t grumm3t is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 3
Leading spaces of variable removed


Code:
#!/bin/bash

TESTVAR="     5spaces"
echo $TESTVAR


Code:
hostame:~# ./test.sh
5spaces

The leading spaces from my variable are removed when the content is echo'd. I am trying to make some tabular data.

`echo -e` also fails.

Any suggestions?