4 ms·
That's pretty neat! But I feel some of those tools can just be implemented with coreutils, pipes, and redirects...
by rank0 6y ago
That's pretty neat! But I feel some of those tools can just be implemented with coreutils, pipes, and redirects...
- jasomill 6y agoWhile not as fancy as errno(1), perl -e '$! = shift and print "$!\n"' ERRNO works to decode (nonzero) ERRNO if Perl is installed (per strerror(3) in the C runtime library linked to Perl, so YMMV on non-POSIXish platforms). Speaking of portability, Microsoft's err.exe[1] is a conceptually similar tool that references a considerably larger collection of Windows error messages (user and kernel mode Win32 error codes, COM HRESULTs, etc) and is therefore far more useful on Windows platforms than anything naïvely implemented in terms of C runtime errno (e.g., my stupid Perl one-liner).