If I were you, I'd have utilized the filter command. It has the ability to sort numerically and specify the range from 1 to 10.