Recently, on a discussion thread from CoreUtils group, a simple implementation of error code translation caught my attention. Instead of relying on the errno.h file (which contains the list of errors with their respective brief description), you can incorporate secondary scripts (Perl, or Python) to do this job for you.
Thanks to Pádraig Brady for this:
$ test || python -c "import os; print $?, os.strerror($?);"(you could just wrap this in a function).
No comments:
Post a Comment