Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

cat: split POSIX, BSD and GNU and add 2 examples #9623

Merged
merged 4 commits into from
Dec 21, 2022

Conversation

pixelcmtd
Copy link
Member

No description provided.

@pixelcmtd pixelcmtd added the page edit Changes to an existing page(s). label Dec 13, 2022
@github-actions github-actions bot added the new command Issues requesting creation of a new page. label Dec 13, 2022
Copy link
Contributor

@EmilyGraceSeville7cf EmilyGraceSeville7cf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No mandatory fixes found, approved.
Thanks for a contribution! 馃殌


`cat -n {{path/to/file}}`
`cat -u {{/dev/tty12}} > {{/dev/tty13}}`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Warning: -u is ignored.
Note: current style guide fallbacks to short options in this case but doesn't specify whether to keep not portable option or remove. My proposal is to discard examples with ignored options as they serve no purpose except that such options exist but do nothing. On the other hand it useful to know as it's a different behavior than interpreting option in the "right" way. Both points of view are reasonable. We can keep mentioning such ignored options in at the end of pages before help/version examples for informational purposes.

Copy link
Member Author

@pixelcmtd pixelcmtd Dec 13, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I have some serious trouble parsing half of your comment.
I don't get what you mean by "not portable option[s]". Are you referring to -u? It is portable and this whole PR's reason to exist is that it is.
Some implementations might ignore it (every day I'm learning to hate GNU a bit more), but that doesn't matter as many do not (or at least they say they don't).

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

By non-portable options I mean working differently on several command versions for different kinds of OS. Checkout freebsd and arch pages: -u works differently (including cases where option is ignored).

Let's keep your edits, as style guide doesn't specify what to do in such case. :)

Copy link
Member

@kbdharun kbdharun Dec 21, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm sorry I have some serious trouble parsing half of your comment. I don't get what you mean by "not portable option[s]". Are you referring to -u? It is portable and this whole PR's reason to exist is that it is. Some implementations might ignore it (every day I'm learning to hate GNU a bit more), but that doesn't matter as many do not (or at least they say they don't).

Agreed, also it seems to be included in the recent POSIX specification Ref.

pages/linux/cat.md Outdated Show resolved Hide resolved
pages/linux/cat.md Outdated Show resolved Hide resolved
Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
Co-authored-by: Emily Grace Seville <EmilySeville7cfg@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new command Issues requesting creation of a new page. page edit Changes to an existing page(s).
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants