sort: fix
This commit is contained in:
parent
ea7563dc0b
commit
9ef61c39e9
2
sort.c
2
sort.c
|
@ -44,7 +44,7 @@ main(int argc, char *argv[])
|
|||
qsort(lines, nlines, sizeof *lines, (int (*)(const void *, const void *))linecmp);
|
||||
|
||||
for(i = 0; i < nlines; i++)
|
||||
if(!uflag || i == 0 || strcmp(lines[i], lines[i-1]) == -1)
|
||||
if(!uflag || i == 0 || strcmp(lines[i], lines[i-1]) != 0)
|
||||
fputs(lines[i], stdout);
|
||||
return EXIT_SUCCESS;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user