Closed paulbouwer closed 9 years ago
Since there is a discrepancy between the versions of sort
on Linux
and OSX
, the version sorting will be implemented via a modified version of the sed
and sort
script show in How to simulate “sort -V” on Mac OSX.
ls | sed 's/^[0-9]\./0&/; s/\.\([0-9]\)$/.0\1/; s/\.\([0-9]\)\./.0\1./g;' | sort -r | sed 's/^0// ; s/\.0/./g'
Windows PowerShell
version will be updated to have consistent sorting now with Linux
and OSX
bash
versions.
Reported by Martin Öbrink-Hansen via twitter
The
-V
option is not supported onOSX
version ofsort
.