String expression Flashcards

1
Q

string

A

string is not null

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

-n string

A

Length of string is greater than 0

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

-z string

A

Length of string is 0

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

string1 = string2

string1 == string2

A

string1 and string2 are equal. == is used for POSIX compliance

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

string1 != string2

A

string1 and string2 are not equal

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

string1 > string2

A

string1 sorts after string2

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

string1 < string2

A

string1 sorts before string2

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