⚲
Project
General
Profile
Sign in
Home
Projects
Help
Search
:
DragonFlyBSD
All Projects
DragonFlyBSD
Overview
Activity
Roadmap
Issues
Documents
Files
Repository
Download (580 Bytes)
Bug #2922
ยป patch-dfbsd-cat-be-align.txt
sevan
, 06/26/2016 07:23 PM
diff --git a/bin/cat/cat.c b/bin/cat/cat.c
index 0d030e1..a2aff71 100644
--- a/bin/cat/cat.c
+++ b/bin/cat/cat.c
@@ -184,10 +184,16 @@ cook_cat(FILE *fp)
} else
gobble = 0;
}
- if (nflag && (!bflag || ch != '\n')) {
- fprintf(stdout, "%6d\t", ++line);
- if (ferror(stdout))
- break;
+ if (nflag) {
+ if (!bflag || ch != '\n') {
+ fprintf(stdout, "%6d\t", ++line);
+ if (ferror(stdout))
+ break;
+ } else if (eflag) {
+ fprintf(stdout, "%6s\t", "");
+ if (ferror(stdout))
+ break;
+ }
}
}
if (ch == '\n') {
(1-1/1)
Loading...