[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: Sun May 13 10:31:01 2001
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
<baltimoremd@xxxxxxxxxxxxxxx> wrote:
> On Sun, 13 May 2001, Steve Werby wrote:
>
> >
> > 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.
>
> Gee, I'm the person who asked, and I understood the script.
Thom, I wasn't implying anything about your knowledge. I just meant that my
suggested modification made sense to me b/c I assumed any user (you
included) would not ever supply an empty argument enclosed in quotes. This
script was so short it doesn't matter much, but you're not the only one who
will read the post and I thought my comment would benefit at least a few
others. For those new to shell scripting (or programming for that matter) I
thought there might be some benefit in mentioning that IMO some of the code
was redundant. If instead of a script with 3 arguments we had one with 9
and we only wanted to execute it if the user supplied 9 arguments, in some
cases all that's required is to check that the 9th argument exists. And if
I wanted to check each argument I'd use a loop. YMMV.
> 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.
>
> Yep...there are a lot of things that could be added....but from a
> requestor's point of view:
>
> The response was very timely
> The script did what I requested
Yes it was. And Eric did a great job and was lightning fast in replying.
In fact I got his response before your original post! I wasn't trying to
step on toes, I was just trying to share my knowledge.
--
Steve Werby
President, Befriend Internet Services LLC
http://www.befriend.com/