how to get the return code of a command

how to get the return code of a command?? you can get the retun code of a command using $? operator.Make sure to save the returncode in a variable just after the command completed.otherwise this will hold the code of the next command executed after your desired.have a look ncftpput… read more →