[olug] Variable with Spaces

Stan Coleman stan at srcproductions.com
Wed Aug 29 22:47:51 UTC 2007



   I would like to add a few blank spaces to the front of a variable  
and so far I've had no luck. Here is what I have so far;  
variable=`tail /var/some/temp/file/text.txt` If the text file has  
spaces for the first few characters the $variable removes the spaces.  
What I'd really like to do is add the spaces to the file first like  
this; sed 's/^/           /' /var/some/temp/file/text.txt and then  
have the $variable keep the leading spaces.




More information about the OLUG mailing list