Live Chat!

check for error number

          0 votos

September 1st, 2006 mysurface

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.
echo $?
To test this, simply ls something doesn’t exist, then it will return value 2. Sometimes, you can obtain the error number, [...]

Posted in Developer, echo, perror | Hits: 3308 | No Comments »