Friday, February 9, 2024

How to redirect STDOUT and STDERR in bash? (> /dev/null 2>&1)

- 1> redirect the STDOUT - 1>> redirect the STDOUT in append mode - 2> redirect the STDERR - 2>> redirect the STDERR in append mode - &> redirect both STDERR and STDOUT - &>> redirect both STDERR and STDOUT in append mode - 2>&1 redirect STDERR to STDOUT

No comments:

Post a Comment