Thread View: gnu.utils.bug
1 messages
1 total messages
Started by Ian Lance Taylor
Wed, 15 Apr 1992 20:41
textutils 1.3 sort bug; doesn't handle - correctly
Author: Ian Lance Taylor
Date: Wed, 15 Apr 1992 20:41
Date: Wed, 15 Apr 1992 20:41
29 lines
1303 bytes
1303 bytes
The sort program in textutils 1.3 doesn't handle a - argument
correctly. When invoked as
cat file1 | sort - file2
it will output only the sorted file1, rather than sorting file1 and
file2 together.
Here is a patch.
--- sort.c.old Mon Mar 16 17:13:22 1992
+++ sort.c Thu Apr 16 00:32:39 1992
@@ -1503,10 +1503,9 @@
if (*s)
badfieldspec (argv[i]);
}
- else if (argv[i][0] == '-')
+ else if (argv[i][0] == '-'
+ && argv[i][1] != '\0')
{
- if (!strcmp ("-", argv[i]))
- break;
s = argv[i] + 1;
if (digits[UCHAR (*s)])
{
--
Ian Taylor ian@airs.com uunet!airs!ian
First person to identify this quote wins a free e-mail message:
``Do you make a grievance of weighing so many pounds only, instead of three
hundred? Then why fret about living so many years only, instead of more?''
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads