I cannot seem to retrieve a non-zero return code when calling the ftp macro. It doesn't matter what errors are encountered during the ftp macro execution e.g. directory doesn't exist, file doesn't exists etc.I'd love to know why.I'm using bash on Solaris. My .netrc file looks like so:machine myftp1        login xxxxxxxx        password xxxxxxxxxmacdef getASCIIfiles       cd $1       hash       prompt off       get $2Executing the following commandsecho \$ getASCIIfiles Scratch/mydir NON_EXISTANT_FILE.TXT | ftp -i myftp1    echo $?produces the following outputHash mark printing on (8192 bytes/hash mark).    Interactive mode on.    NON_EXISTANT_FILE.TXT: The system cannot find the file specified.    0Why is zero being returned?
Return code is always 0 after running echo \$ macroName  | ftp -i mymachine
solaris;ftp;return status
The 'ftp' command does not seem to return other error codes than 0.An alternative solution would be to check the FTP return codes.There is some examples in how to do this here: https://stackoverflow.com/a/4442763