sort -k1 -n -t, filename should do the trick.
sort -k1 -n -t, filename
-k1 sorts by column 1.
-k1
-n sorts numerically instead of lexicographically (so "11" will not come before "2,3...").
-n
-t, sets the delimiter (what separates values in your file) to , since your file is comma-separated.
-t,
,
I don't know why above solution was not working in my case.
15,517,218,619,48,258,909,479,4910,6710,9013,96159,9
however this command solved my problem.
sort -t"," -k1n,1 fileName
csvsort
Install csvkit if not already installed.
csvkit
brew install csvkit
Sort CSV by first column.
csvsort -c 1 original.csv > sorted.csv