Sort numbers in ascending order using echo, and as an alias
I am trying to sort a list of numbers in ascending order. I got the following from another closed thread. (Thank You)
echo "8,56,15,37,21" | tr ',' '\n'|sort -n|paste -s -d','
I would now like to use it as an alias, so I can enter a list of numbers and have them sorted, but when I set it up like this:
alias st 'echo $1 |tr ',' '\n'|sort -n|paste -s -d',' '
And run it, I get the following error.
paste: 8,56,15,37,21: No such file or directory
Is there a way to have the alias recognize the single quotes?