Bruce Korb <[EMAIL PROTECTED]> wrote:
> So, what do you think about adding POSIX library/sys calls as
> a collection of command line utilities?  We already have "stat",
> but don't have "getpwnam".  There are a few others.....

I hesitate to add new tools that can be approximated with
one-liners using e.g Perl

  $ perl -MUser::pwent -e '$pw=getpwnam "root" or die; print $pw->shell,"\n"'
  /bin/bash

  [ Coreutils should come with a collection of useful one-liners,
    shell functions/aliases, and little scripts.  But someone would
    have to collect and document them.  Volunteers? ]

But `getpwnam --shell root' is certainly easier to type.  And
as a real program, it'd be able to produce better (including
internationalized) diagnostics and do better error checking --
e.g. via closeout.c's close_stdout.

So, in this case it's probably worth it.  I do like the idea of a
getpwnam command, but am not sure that should be the name of the command.
Obviously it's a good name from the consistency-with-library-name
standpoint, but its mangled name is sort of reminiscent of `creat'.
Suggested alternatives welcome.

Would you be interested in converting your program to use the same
sort of framework that's used in the other 90 programs in coreutils?
And documenting it?


_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to