Why can't the following redirection outside the command substitution suppress the output to stderr:OLD_DATE=$(date --datethree days ago)  2> /dev/nullwhile this one with the redirection inside the command substitution can:OLD_DATE=$(date --datethree days ago 2> /dev/null)
redirection inside and outside command substitution
bash
It seems because the redirect applies to the empty command after the assignment. For example, you get the same result with this command:OLD_DATE=$(date --datethree days ago) true 2> /dev/nullAnd this is the same as your command without the assignment:2> /dev/null(Yes, that's a valid command line.)