Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 05 Aug 2016 16:22:54 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 210607] patch to bin/cat/cat.c to align output between when invoked with -be & -ne flags
Message-ID:  <bug-210607-8-p4hoRdLVfX@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-210607-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-210607-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D210607

--- Comment #4 from Sevan Janiyan <venture37@geeklan.co.uk> ---
(In reply to John Baldwin from comment #3)

> 1) The 'BSD' output from CSRG is the current one, not NetBSD's recent cha=
nge.  The other output has been in place for 35 years.

That made me smile, <3
ok, the NetBSD change is nearly 10 years old. :)

> 2) The language is not clear (and I'd be fine with clarifying it), but wh=
at you are changing is to have 'cat -be' insert extra leading blankspace fo=
r blank lines, but 'cat -b' does not.

>From the source code
/* -b implies -n */
/* -e implies -v */

Ignoring the -e flag & comparing the difference between -b & -n with the
following in a text file called a.txt
a b c

1 2 3

x y z

cat -b a.txt produces
     1  a b c

     2  1 2 3

     3  x y z

cat -n a.txt produces
     1  a b c
     2=20=20
     3  1 2 3
     4=20=20
     5  x y z

so if -b implies -n, when invoked with -e, would you build on that or give
another variant of output?

cat -be a.txt
     1  a b c$
        $
     2  1 2 3$
        $
     3  x y z$

or

cat -be f.txt
     1  a b c$
$
     2  1 2 3$
$
     3  x y z$

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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-210607-8-p4hoRdLVfX>