How to ignore Netout Error.?

Hi All ,

Am using unix KSH .
I would like to clarify two doubts.

  1. Whenever am transfering the zero size file am getting the warning message netout.
  2. files will be transferred to target server or not?

I have used the code as

if [ "${PWD}" = "${PWD}" ]
then
VAR="ftp.sh -c put ${FILE} ${FILE} ${IP_ADDR} ${USER}
${PASSWD} ${USER_DIR}_tmp ${LOG}"
fi
${VAR} 2> ${ERR}
if [ $? -ne 0 ]
then
echo  "Error running ftp.sh to send ${FILE} - see ${LOG}"
else
echo  "Successfully sent "
..
..
..

I would like to know

  1. what is the value in VAR variable after transfering zero size files.
  2. how to ignore this warning instead ${ERR} use /dev/null ?
  3. whenever am transferring zero size file am getting the error running ftp.sh to send ${FILE} - see ${LOG}" ( ex: if am transferring zero size files in code goes to else part i.e successfully sent )

I don't know why you are getting an error from netout when you run ftp.sh. If you would show us the actual error message you get and show us the contents of ftp.sh we might be able to help.

  • You haven't shown us how FILE, IP_ADDR, USER, PASSWD, USER_DIR, or LOG are set, so it is hard for us to guess at what:
    text "ftp.sh -c put ${FILE} ${FILE} ${IP_ADDR} ${USER} ${PASSWD} ${USER_DIR}_tmp ${LOG}"
    will expand to when it is assigned to VAR. But it doesn't seem likely that VAR's value will be changed by the command:
    text ${VAR} 2> ${ERR}
  • What do you mean by ignore the warning? Do you want to hide a diagnostic message? Do you want to ignore the fact that an error occurred and have your script pretend that everything is OK? Have you considered doing something to make your script work in such a way that it doesn't generate a diagnostic message?
  • Make ftp.sh return 0 in cases where it completes successfully instead of printing a diagnostic message and returning a non-zero exit status.

If you using FTP on a MS-based system,it is possible a NETOUT error may occur when transferring savefile.
possible reason

  1. savefile object on pc could be corrupted
  2. Invalid extension