King Akbar’s Line

One day the Great Akbar drew a line on the floor and asked his sage Birbal to shorten it without touching and wiping out the ends.

How did Birbal solve this problem?