Empty string



examples/script/empty_string.sh
#!/bin/bash

read -p "Please type in your name: " name
if [ "$name" = "" ]
then
    echo "Name was missing"
    exit 1
fi

$ ./examples/script/empty_string.sh 
Please type in your name: Foo

$ ./examples/script/empty_string.sh 
Please type in your name: 
Name was missing