I'd like to create a variable with the value of X number of space( no Perl please), printf seems to work, but , in following example,10 spaces becomes 1 space when assinged to a variable, Why? other solutions are welcome.
when you are passing a value with embedded spaces you always need to double quote the variable, otherwise echo (or any other function/utility) would treat multiple consecutive spaces as a single argument separator.