Created
November 30, 2012 02:37
-
-
Save patrickkettner/4173432 to your computer and use it in GitHub Desktop.
How to do basic ternary operations in Powershell
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$variable_to_set = if ($variable_to_check -gt 0 ) { 1 } else { -1 } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment