uniq: dont use count format if empty
This commit is contained in:
parent
695940d50c
commit
b2e73936bf
1
uniq.c
1
uniq.c
|
@ -49,6 +49,7 @@ uniqline(FILE *ofp, char *l)
|
||||||
if (prevline) {
|
if (prevline) {
|
||||||
if ((prevlinecount == 1 && !dflag) ||
|
if ((prevlinecount == 1 && !dflag) ||
|
||||||
(prevlinecount != 1 && !uflag)) {
|
(prevlinecount != 1 && !uflag)) {
|
||||||
|
if (*countfmt)
|
||||||
fprintf(ofp, countfmt, prevlinecount);
|
fprintf(ofp, countfmt, prevlinecount);
|
||||||
fputs(prevline, ofp);
|
fputs(prevline, ofp);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user