Welcome to the Linux Foundation Forum!

Lab 8.8

I don't understand the result of the last run:

$ ./teststring.sh dog ""
Is string 1 zero length? Value of 1 means FALSE
1
Is string 2 nonzero length? Value of 0 means TRUE;
0
length of string1 = 3, length of string2 = 0
String 1 is longer than string 2
String 1 is not the same as string 2

If the second string is zero length, the -n test should be false, right?

Categories

Upcoming Training