Page MenuHomeFreeBSD

cat: add -A, -E and -T flags
ClosedPublic

Authored by bapt on Fri, Aug 28, 3:49 PM.
Tags
None
Referenced Files
F170956975: D59250.id185471.diff
Mon, Sep 7, 8:46 PM
F170931675: D59250.id185471.diff
Mon, Sep 7, 4:47 PM
F170910803: D59250.id185471.diff
Mon, Sep 7, 12:43 PM
F170896020: D59250.id185352.diff
Mon, Sep 7, 9:53 AM
F170877187: D59250.id185471.diff
Mon, Sep 7, 5:42 AM
F170875963: D59250.id185352.diff
Mon, Sep 7, 5:29 AM
F170854752: D59250.diff
Mon, Sep 7, 1:47 AM
F170828344: D59250.diff
Sun, Sep 6, 9:27 PM
Subscribers

Details

Summary

Support cat -A, -E and -T, which are commonly used by Linux shell
scripts. -E prints a "$" at the end of each line, -T renders tabs
as ^I, and -A is equivalent to -vET.

Discussed with: jrtc27

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76277
Build 73160: arc lint + arc unit

Event Timeline

bapt requested review of this revision.Fri, Aug 28, 3:49 PM
bin/cat/cat.1
87

Please move this after line 80 for alphasort

bin/cat/cat.c
169

Can this be moved to after 165 for alphasort?

175

Can this be moved to after line 171 for alphasort?

190

Can this be moved to after line 186 for alphasort?

The reason is because whenever I have manuals where the options are jumbled up, the code also has jumbled up options.

bin/cat/tests/cat_extra_test.sh
6

Silly nit: I think you have an extra "#" here.

Minor nits on the implementation but looks functionally correct. Will defer to Alex and others for finessing the manpage.

bin/cat/cat.c
106

Should this be in the same order as the switch?

173
188
This revision is now accepted and ready to land.Fri, Aug 28, 4:13 PM
bin/cat/cat.c
106

Oh yeah I like that

This revision was automatically updated to reflect the committed changes.
bapt marked an inline comment as done.