Empty string: Difference between revisions
Content deleted Content added
m →{{header|UNIX Shell}}: addition |
m →{{header|UNIX Shell}}: typo |
||
Line 345: | Line 345: | ||
# the "test" command can determine truth by examining the string itself |
# the "test" command can determine truth by examining the string itself |
||
if [ $s ]; then echo "not empty; else echo "empty"; fi |
if [ $s ]; then echo "not empty"; else echo "empty"; fi |
||
# compare the string to the empty string |
# compare the string to the empty string |