-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
Remove useless cat usage #49846
Remove useless cat usage #49846
Conversation
The committers listed above are authorized under a signed CLA. |
Welcome @bebehei! |
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
✅ Pull request preview available for checkingBuilt without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
@@ -62,7 +62,7 @@ To manually enable IPv4 packet forwarding: | |||
|
|||
```bash | |||
# sysctl params required by setup, params persist across reboots | |||
cat <<EOF | sudo tee /etc/sysctl.d/k8s.conf | |||
sudo tee /etc/sysctl.d/k8s.conf <<EOF |
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.
nit:
sudo tee /etc/sysctl.d/k8s.conf <<EOF | |
echo 'net.ipv4.ip_forward = 1' | sudo tee /etc/sysctl.d/k8s.conf |
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.
Well then. Let's do it right in the right way 😄
sudo tee /etc/sysctl.d/k8s.conf <<EOF | |
sudo tee /etc/sysctl.d/k8s.conf <<<'net.ipv4.ip_forward = 1' |
This doesn't seem to be the only use of I'll rework this tomorrow with a
|
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.
Honestly, I think the existing approach is easier to explain and learn, even if you can save a process. You don't even need tee
here.
Folks who know Linux to work out the equivalent commands are welcome to do that; our audience includes people who can't.
@sftim thanks for your wise words.
I acknowledge, there are parts of the audience, who do not understand the differences between the details we're talking about here in the PR. And I think we can agree, they do not need to understand.
I prefer readable commands, which are mostly copy-pastable and comprehensible. Having comprehensible commands serves all audiences of any experience level. But how do you conclude, the first example is easier to comprehend than the second or the third? |
I've taught lots of people how to use Linux. I think the mental model people have to build for the first one is easiest. |
Remove the useless redirection of
cat
.