On 11/28/2015 11:34 PM, Assaf Gordon wrote:
> On 11/29/2015 12:16 AM, Pádraig Brady wrote:
> 
>>> I must collate some gotchas like this.
>>
>> Initial list started at:
>> http://www.pixelbeat.org/docs/coreutils-gotchas.html
>>
> 
> Fantastic list!

Another common gotcha (at least it is a frequently-reported non-bug):

When using sort on a particular field, you almost always want '-k1,1',
not '-k1'.  While sorting from field 1 to the end of the line sometimes
works (particularly for -n), it is a trap for the novice who doesn't
realize that -k1,1 is more precise, where the trailing delimiter and
subsequent fields can't affect the results.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to