Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 2>&1 Mean in PowerShell

Tags:

powershell

I have the following script:

if( $timeout -ne $null ) {     & $var$timeout 2>&1 > $logDir\$logName } else {     & $var2>&1 >  $logDir\$logName } 

I'm curious about what 2>&1 is; or, what it represents. I don't know what it's called, otherwise, I'd look it up.

like image 913
BlackHatSamurai Avatar asked Jul 29 '13 18:07

BlackHatSamurai


People also ask

Whats does 2 mean?

1 : being one more than one in number. 2 : being the second —used postpositively section two of the instructions. two. pronoun. plural in construction.

What does 2 mean in texting?

<2 is an emoticon which means "Almost in Love." It is a way of telling someone that you have very strong feelings for them, but do not love them yet.

What does 2 mean in TikTok?

TikTok is pretty big on manifestation and spirituality, so it's no surprise that our FYPs are full of 'twosday' videos. According to TikToker Chyna Desveaux the number 2 in numerology represents balance, meaning that 22/2/2022 is all about a fresh start.

What does +2 mean on Facebook?

Here's what you see as you add friends before hitting the recommended maximum, and what you see after continuing to add friends. The +2 seems to indicate that you are possibly adding more than Facebook recommends.


1 Answers

It redirects standard error (the 2) to the same place as standard output (the 1)

like image 142
Sean Avatar answered Sep 18 '22 11:09

Sean