-
-
Notifications
You must be signed in to change notification settings - Fork 91
Concept: Redirections #736
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking good over all. Suggestions provided.
concepts/redirections/about.md
Outdated
|
||
## Combining redirections | ||
|
||
Multiple redirections can be given at once. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple redirections can be given at once. | |
Multiple redirection can be given at once. |
I believe this is more correct than using the plural, even here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I disagree. Singular sounds weird when following "multiple".
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does, but it is a single concept, each redirection can be given multiple times.
concepts/redirections/about.md
Outdated
* Purpose: Redirects the standard output (stdout) of a command to a file. | ||
* Behavior: | ||
* If the file doesn't exist, it's created. | ||
* If the file exists, its contents are overwritten. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is "overwritten" the same as "truncated"? Does overwritten imply that if the existing file in 10k and we write 1 byte, we only modify one byte?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The effect may be the same, while the work may be less to just overwrite the file. If we were to truncate, we would have to know information about the content of the file. To overwrite it we only need to know the name (the file system handles other technical aspects, such as managing fragmentation, etc.).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think that we can leave it as "overwritten" as it is effectively doing that, to completion. The technical details are a little deep and involves the media layer.
concepts/redirections/about.md
Outdated
* Purpose: Appends the standard output (stdout) of a command to a file. | ||
* Behavior: | ||
* If the file doesn't exist, it's created. | ||
* If the file exists, the output is added to the end of the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* If the file exists, the output is added to the end of the file. | |
* If the file exists, the output is appended to the end of the file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree, but "added" is probably generally understood. Either word works, "added" is more common of a word.
concepts/redirections/about.md
Outdated
|
||
### `2>` (Error Redirection): | ||
|
||
* Purpose: Redirects the standard error (stderr) of a command to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* Purpose: Redirects the standard error (stderr) of a command to a file. | |
* Purpose: Redirects the standard error (`stderr`) of a command to a file. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Singluar "Redirect" being my suggestion, but I like the code formatting of the stderr
here.
3d2b543
to
adf8673
Compare
A lot of this text is AI generated.