[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
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=210607
--- 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
https://svnweb.freebsd.org/csrg/bin/cat/cat.c?r1=962&r2=1357
> 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.
FreeBSD
-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."
2.9.1BSD
-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