the sort cmd and judge a number from input