[Bug 210607] patch to bin/cat/cat.c to align output between when invoked with -be & -ne flags

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Fri Aug 5 14:15:03 UTC 2016


--- Comment #2 from Sevan Janiyan <venture37 at geeklan.co.uk> ---
(In reply to John Baldwin from comment #1)

> Note that GNU cat follows the current behavior:

These extensions to cat were introduced in BSD so the GNU implementation is an
imitation of ours

> The idea being that you only get leading indentation if there is a line number.

Going to the description in the man pages, there is no reference to such
behaviour which is really frustrating as it leaves it down to interpretation.  

-b "Number the  non-blank output lines, starting at 1."
-e "Display non-printing characters (see the -v option), and display a dollar
sign (`$') at the end of each line."
-n "Number the  output lines, starting at 1."

-b "This, together with -n cause numbers to be omitted from blank lines."
-e "Follow ends of lines with the $ character."
-n "Number each line."

I'd say for consistency the output should the same aside from what gets omitted
with a specific flag when it is specified.

You are receiving this mail because:
You are the assignee for the bug.

More information about the freebsd-bugs mailing list