about summary refs log tree commit diff
diff options
context:
space:
mode:
authorChristian Neukirchen <chneukirchen@gmail.com>2015-08-09 20:03:16 +0200
committerChristian Neukirchen <chneukirchen@gmail.com>2015-08-09 20:03:16 +0200
commite81f6169927db72e6e704ee612f16960829e8dd6 (patch)
treedbf29cb833f9556d5c05be34dae1099d70c0cebb
parent2487571008ee5c6d69ffaa85c40035d6d8b81912 (diff)
downloadnq-e81f6169927db72e6e704ee612f16960829e8dd6.tar.gz
nq-e81f6169927db72e6e704ee612f16960829e8dd6.tar.xz
nq-e81f6169927db72e6e704ee612f16960829e8dd6.zip
fq: fix -q output when file contains no newline at all
-rw-r--r--fq.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fq.c b/fq.c
index 632404a..98b80fc 100644
--- a/fq.c
+++ b/fq.c
@@ -190,6 +190,9 @@ main(int argc, char *argv[])
 			loff += rd;
 		}
 
+		if (qflag && !seen_nl)
+			write(1, "\n", 1);
+
 #ifdef USE_INOTIFY
 		inotify_rm_watch(ifd, wd);
 #endif