Error or no success running a command always return a number, usually it will return 0 unless it occurs an error. To check what error number it returns, do this after command is done.
To test this, simply ls something doesn’t exist, then it will return value 2. Sometimes, you can obtain the error number, and you want to know what is the number indicate, you can do this
it will shows
OS error codeÂ Â 2:Â No such file or directory
perror command come with mysql-server, if you do not install mysql-server, you won’t have this command.