Equal to and not equal to

The -eq (equal to) and -ne (not equal to) operators perform exact (and, by default, case-insensitive) comparisons. For example, the following returns true:

1 -eq 1 
'string' -eq 'string' 
[char]'a' -eq 'A' 
$true -eq 1 
$false -eq 0 

Similarly, -ne (not equal) will return true for each of these:

20 -ne 100 
'this' -ne 'that' 
$false -ne 'false' 
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.137.163.197