Bug 687

Summary: sort with a key broken
Product: [Retired] Red Hat Linux Reporter: H. Peter Anvin <hpa+rhbugs>
Component: textutilsAssignee: David Lawrence <dkl>
Status: CLOSED WONTFIX QA Contact:
Severity: medium Docs Contact:
Priority: high    
Version: 5.2Keywords: Security
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 1999-01-05 20:59:33 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description H. Peter Anvin 1999-01-05 00:35:36 UTC
"sort" returns the wrong answer when used with a key
specifier.  Since "sort" is used by many scripts, this could
have severe implications:

linux 28 % cat /tmp/test
Alpha Charlie
Bravo Delta
Alpha Foxtrot
Bravo Echo
linux 29 % sort +6 /tmp/test
Alpha Charlie
Alpha Foxtrot
Bravo Delta
Bravo Echo
linux 30 % which sort
/bin/sort
linux 31 % rpm -qf /bin/sort
textutils-1.22-7

Comment 1 Jeff Johnson 1999-01-05 20:59:59 UTC
This is not a problem for a key specifier in range (i.e try "sort +1")