What does 1>&2
mean in a bash script?
For instance, what does the following line from a bash script do?
echo "$1 is not a directory!" 1>&2
I use MacOS X. My bash script is:
if [ ! -d $1 ]; then
echo "$1 is not a directory" 1>&2
exit 1
fi
Definition: Active or Top Partner (typically used in gay dating) Type: Cyber Term.
1 : first in rank, importance, or influence : foremost cancer is the country's number one killer —often written No. 1. 2 : of highest or of high quality. Synonyms & Antonyms More Example Sentences Learn More About number one.
/ˌplʌs ˈwʌn/ a person that you take to a party or other event, usually when the invitation says that you can bring one other person with you: She asked Martin to be her plus one at the benefit. Inviting & summoning.
It outputs the message to stderr
. Therefore 1>&2
means redirect stdout
to stderr
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With