Sunday, February 24, 2013

How to tell if a string is not defined in a bash shell script

#!/bin/bash

if [ -z $1 ]; then
        echo 'Enter something please.';
        exit 1;
fi;

No comments:

Post a Comment