spaces trimming while assigning to a variable

Hi my lovely friends,

Im writing one pgm in which i trying to assign some values like
$var='Jun 6'
but if i do echo of this $var will trim the spaces expect one space.
$echo $var
$Jun 6

But if var='Jun 28', then this will works fine
$echo $var
$Jun 28

this is required to exctract date wise files like
$ls -lrt
XXXXXXXXXXXXX XXXXXXXXX XXXXXXX 00:10 Jun 6 test.txt
XXXXXXXXXXXXX XXXXXXXXX XXXXXXX 00:10 Jun 28 test.txt

$var=`ls -lrt | grep -i 'Jun 6'`
$echo $var
$Jun 6

this is very much essential for my program.
Hope your help.

You need to sort out your quotes when you use them with grep.

$ var='Jun  6'   # two spaces
$ echo "$var"
Jun  6               # two spaces
$ echo $var
Jun 6                # one space echo interpreted this as two args
$

$ ls -lrt | grep "$var"
-rw-r--r--     1   reborg    reborg   653 Jun  6 testfile.txt

Many thanks for your help.
Its working now.

Lokesha