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

Redirect stdout to stderr at the beginning of the line #13

Open
jdeanwallace opened this issue Jun 20, 2023 · 0 comments
Open

Redirect stdout to stderr at the beginning of the line #13

jdeanwallace opened this issue Jun 20, 2023 · 0 comments

Comments

@jdeanwallace
Copy link
Contributor

jdeanwallace commented Jun 20, 2023

As suggested by @cghague in a PR review comment.

When redirecting stdout to stderr, always place the redirect at the beginning of the line. Doing so facilitates reading. For example:

# BAD.
echo 'An error has occurred' >&2

# GOOD.
>&2 echo 'An error has occurred'
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