Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
nurettin
21 days ago
|
parent
|
context
|
favorite
| on:
What does " 2>&1 " mean?
I saw this newer bash syntax for redirecting all output some years ago on irc
foo &> file foo |& program
ndsipa_pomu
21 days ago
|
next
[–]
I think the "|&" is the most intuitive syntax - you can just amend an existing pipe to also include STDERR
rezonant
21 days ago
|
prev
[–]
I didn't know about |&, not sure if it was introduced at the same time. So I'd always use &> for redirection to file and 2>&1 for piping
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: