|
From: | Peng Yu |
Subject: | How to count the last line when it does not end with a newline character? |
Date: | Sun, 5 Sep 2021 00:37:50 -0500 |
I got 1 instead of 2 in the following example. How to count the last even when it does not end with a newline character? Thanks. $ printf 'a\nb'|wc -l 1 -- Regards, Peng
[Prev in Thread] | Current Thread | [Next in Thread] |