Any non-zero exit code will prevent the slave from being used by Jenkins.
Commands typed in here is executed as a shell script (by using the shell you specified in the system config page), but if you need to use a different interpreter, start with "#!" and it'll execute the script with your interpreter of the choice.