On 01/18/2014 09:29 AM, Bartosz Gołaszewski wrote: > 2014/1/17 Pádraig Brady <[email protected]>: >> So these are warning messages indicating a usage issue. >> The specific one here is you've _spanned_ multiple fields >> but numeric compares auto terminate at the first numbers. > > Thanks, that explains it! > >> You probably want to compare multiple fields in sequence. I.E. >> >> sort -k2,2n -k3,3n >> >> thanks, >> Pádraig. > > I was actually checking some busybox compatibility issues.
In fact, it's possible to contrive corner cases where numeric sorting DOES span fields: $ printf '10210304\n20120403\n30102305\n' | sort -t0 -k2,3n --debug sort: using ‘en_US.UTF-8’ sorting rules sort: key 1 is numeric and spans multiple fields 30102305 ____ ________ 20120403 ____ ________ 10210304 ____ ________ -- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
