[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [cobalt-users] virtusertable - Non Gui Add



<flash22@xxxxxxx> wrote:
> > if ! test -z $3
> > then
> > [EXECUTE SCRIPT]
> > else
> >
> > echo "Usage is ./adduser.sh username domain destination"
> > fi
>
> um.... script "" "" "foo"

OK, I should have known better.  I assumed the person using the script would
be aware that the arguments are required (and non-empty) and that the only
case that needed to be checked for was when less than the expected # of
arguments were supplied.  If I was writing a bash script for my own usage I
would do it my way, but if I was writing to check for bad arguments I would
check each argument using a loop and I would do things like verify that the
domain exists on the box.

--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/