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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposal: Mark cat file.txt | or < file.txt as preferred in the style guide #13668

Open
Managor opened this issue Sep 11, 2024 · 0 comments
Open

Comments

@Managor
Copy link
Collaborator

Managor commented Sep 11, 2024

cat file.txt | and < file.txt do the same exact thing. For this reason it would be beneficial to prefer using one over the other in the pages. The advantage of < file.txt would be that we don't need to involve any other commands but it's less known than piping. Thus new users might not understand what it does. If we started using it commonly, the knowledge of what it does might spread. cat file.txt | has the advantage that everyone has seen it being used.

This should not be a hardline stance. Each command should be judged case by case based on how it's most commonly written on the internet, but when in doubt this guideline could be used.

@Managor Managor changed the title Proposal: Prefer either cat file.txt | or < file.txt in the style guide Proposal: Mark cat file.txt | or < file.txt as preferred in the style guide Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant