In a traditional Windows shell, I can use net helpmsg to get the string-based message from an exit status code. For example, if I wanted to know what a status of 2 meant, I would do the following:
INPUT COMMMAND: net helpmsg 2
OUTPUT: The system cannot find the file specified.
I am wondering: is there an equivalent function in Bash (wherein I pass an error code and a string is returned)?
Thanks!
MySQL provides
perror, which handles OS and MySQL error codes.