Page MenuHomeFreeBSD

comm(1): Add EXAMPLES section
ClosedPublic

Authored by fernape on Jun 18 2020, 4:33 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Apr 18, 11:18 AM
Unknown Object (File)
Thu, Apr 18, 1:38 AM
Unknown Object (File)
Mar 4 2024, 4:46 PM
Unknown Object (File)
Dec 28 2023, 4:10 AM
Unknown Object (File)
Dec 20 2023, 7:01 AM
Unknown Object (File)
Jul 5 2023, 1:38 AM
Unknown Object (File)
Jul 5 2023, 1:37 AM
Unknown Object (File)
Jul 5 2023, 1:37 AM

Details

Reviewers
gbe
Group Reviewers
manpages
Commits
rS363620: comm(1): Add EXAMPLES section
Summary

Two very simple examples for this utility, but I honestly thing it is better
than not having examples at all :-)

Test Plan
  • mandoc -Tlint clean
  • igor clean
  • aspell happy
  • man ./comm.1 renders the page properly

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 31895
Build 29448: arc lint + arc unit

Event Timeline

Use \e instead of manually escaping characters

Properly updating review.

Using \e instead of manually escaping characters

gbe added inline comments.
usr.bin/comm/comm.1
113

When I try the example, I got a different output. See below,

$ echo -e "B\nc" | comm ~/tmp/example.txt -
a
b
	B
		c
d
usr.bin/comm/comm.1
113

Sorry for the delay, I took some days off and went AFK :-)

Strange, I get this:

[fernape@vm-current ~]$ cat example.txt
a
b
c
d
[fernape@vm-current ~]$ echo -e "B\nc" | comm example.txt -
        B
a
b
                c
d
[fernape@vm-current ~]$ uname -a
FreeBSD vm-current 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r362494: Mon Jun 22 20:26:42 CEST 2020     root@vm-current:/usr/obj/usr/src/amd64.amd64/sys/GENERIC  amd64

and exactly the same output in 12.1-RELEASE.

I suspect it might be the environment. In my case, the variables that affect the behavior of comm(1) are cleared:

$ echo $LANG $LC_ALL $LC_COLLATE $LC_CTYPE
$

This is the output from freefall

[fernape@freefall ~]$ echo -e "B\nc" | comm example.txt -
        B
a
b
                c
d
[fernape@freefall ~]$ uname -a
FreeBSD freefall.freebsd.org 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r360534: Fri May  1 17:50:03 UTC 2020     sbruno@build-13.freebsd.org:/usr/obj/usr/src/sys/CLUSTER13  amd64

This is the output from freefall

[fernape@freefall ~]$ echo -e "B\nc" | comm example.txt -
        B
a
b
                c
d
[fernape@freefall ~]$ uname -a
FreeBSD freefall.freebsd.org 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r360534: Fri May  1 17:50:03 UTC 2020     sbruno@build-13.freebsd.org:/usr/obj/usr/src/sys/CLUSTER13  amd64

I have some language settings for german umlauts active, but I didn't remember which ones. So I would think that this differential is fine.

This revision is now accepted and ready to land.Jul 27 2020, 3:55 PM
This revision was automatically updated to reflect the committed changes.
In D25344#572188, @gbe wrote:

This is the output from freefall

[fernape@freefall ~]$ echo -e "B\nc" | comm example.txt -
        B
a
b
                c
d
[fernape@freefall ~]$ uname -a
FreeBSD freefall.freebsd.org 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r360534: Fri May  1 17:50:03 UTC 2020     sbruno@build-13.freebsd.org:/usr/obj/usr/src/sys/CLUSTER13  amd64

I have some language settings for german umlauts active, but I didn't remember which ones. So I would think that this differential is fine.

Thanks for reviewing this!