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

[scenario 4] Use 2>&1 instead of &> for error redirection #13

Open
pierrepo opened this issue Jul 25, 2023 · 0 comments
Open

[scenario 4] Use 2>&1 instead of &> for error redirection #13

pierrepo opened this issue Jul 25, 2023 · 0 comments

Comments

@pierrepo
Copy link
Collaborator

The &> is non portable and for Bash > 4 only.

Instead of:

grep foo /shared/data/bank/homo_sapiens &> sdt_out_and_log.txt

we should have

grep foo /shared/data/bank/homo_sapiens 2>&1 >sdt_out_and_log.txt
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