But this brings up a question of
principle. It's a genuine question, because I'm quite
inexperienced in all this.
- The manpage doesn't mention your way of doing it.
- The preamble to the actual adduser script doesn't mention it.
- The script starts by checking the command under which it was
called:
$action = $0 eq "addgroup" ? "addgroup" : "adduser";
The "addgroup this_user this_group" slips through the subsequent
checks, as it were, and functions as "adduser this_user this_
group".
This just seems "unclean" to me. I'm aware that "there's always
more than one way of doing something," and that in this case no
harm can be done because of the definition of the command-line
arguments, but this is one command substituting itself for
another in an undocumented way. Isn't there something sloppy
about this that could cause trouble in other circumstances? Or
am I still a long way from understanding the unix/linux way of
doing things?