Comparison Operators Flashcards

1
Q

-eq

A

equals

ie:
$a = 5
$a -eq 4

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

-ne

A

not equal

ie:
$a = 5
$a -ne 4

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

-gt

A

greater than

ie:
$a = 5
$a -gt 4

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

-ge

A

greater than or equal to

ie:
$a = 5
$a -ge 5

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

-lt

A

less than

ie:
$a = 5
$a -lt 5

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

-le

A

less than or equal to

ie:
$a = 5
$a -le 5

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

-like

A

wildcard comparison

ie:
$a = “This is Text”
$a -like “Text”

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

-notlike

A

wildcard comparison

ie:
$a = “This is Text”
$a -like “Text”

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

-match

A

regular expression comparison

ie:
$a = “Text is Text”
$a -match “Text”

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

-notmatch

A

regular expression comparison

ie:
$a = “This is Text”
$a -notmatch “Text$”

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly