[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] virtusertable - Non Gui Add
- Subject: Re: [cobalt-users] virtusertable - Non Gui Add
- From: "Steve Werby" <steve-lists@xxxxxxxxxxxx>
- Date: Sat May 12 12:08:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
"eric welling" <eric@xxxxxxxxxxx> wrote:
<snip>
#!/bin/bash
> NAME=$1
> DOMAIN=$2
> RESULT=$3
> if [ "$1" = "" ]; then
> echo "Usage is ./adduser.sh username domain destination"
> exit 1
> fi
> if [ "$2" = "" ]; then
> echo "Usage is ./adduser.sh username domain destination"
> exit 1
> fi
</snip>
Eric, FYI, you can make the script a lot shorter by just checking whether
the last argument's length is non-zero since that will cover all cases where
the wrong # of arguments are supplied.
if ! test -z $3
then
[EXECUTE SCRIPT]
else
echo "Usage is ./adduser.sh username domain destination"
fi
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/