#! /bin/bash # # strings - demoonstrates string comparisions, call with 2 arguments # if [ "$1" = "$2" ]; then echo "string1 matches string2" fi if [ "$1" != "$2" ]; then echo "string1 does not match string2" fi if [ -n "$1" ]; then echo "string1 is not null (has length greater than 0)" fi if [ -z "$1" ]; then echo "string1 is null (has length 0)" fi