moreutils: an 'errno' utility

Joey Hess joey at kitenet.net
Sat Aug 21 11:58:32 BST 2010


Dustin Kirkland wrote:
> I have contributed a small utility (and manpage) called "errno" to
> Debian/Ubuntu's ubuntu-dev-tools package.  Several people have
> suggested [1] that this utility might have a better home in your
> moreutils project.  I didn't originally submit it to moreutils because
> most of those tools appear to do their work on stdin.

That is not a criteria for moreutils; doing something generally useful that
cannot be accomplished with standard unix tools is the only criteria.

> In any case, it's a ~10 line shell script that takes one or more
> strings on the command line, and looks for a matching POSIX error
> codes, error names, or error descriptions.  It's useful, as a
> developer on a command line, to work your way to and from error tuples
> of codes/names/descriptions.  People have suggested rewriting it in
> Python, which can be done easily.  And many, many people have written
> their own grep hacks to do the same [2].

This is a good idea, but the implementation leaves something to be
desired, since it requires gcc and libc headers.

Couldn't a C program use sys_errlist[]? (see perror(3))

-- 
see shy jo
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 828 bytes
Desc: Digital signature
Url : https://lists.ubuntu.com/archives/ubuntu-devel/attachments/20100821/f4d48918/attachment-0001.pgp 


More information about the ubuntu-devel mailing list