Home > OS >  Ask bosses system function performs sh file and performs inconsistent results sh file on the command
Ask bosses system function performs sh file and performs inconsistent results sh file on the command

Time:09-23

The current operating system is AIX
Need through the CPP program FTP server a picture sent to the purpose, objective server is Windows
This function through a up_file_cmd. Sh file to execute, up_file_cmd. Sh file content is as follows:

#! The/usr/bin/KSH
FTP - n & lt; The open ipaddress
The user userid password
Bin
Put XXXXX. JPG
Bye
!

Is currently in the operating system command line./up_file_cmd. Sh, image can be normal transmission success
But in the CPP program, through the system (" up_file_cmd. Sh ") function to perform, although the JPG image file is transmitted in the past, but the image format is not according to the binary format transfer, cause the picture can't open,

Note: CPP procedure through the tuxedo middleware compiled execute

Echo $SHELL: usr/bin/KSH
The echo $PATH: contains usr/bin: usr/sbin

The command line and CPP application login user is the same, the same as the PATH

Bosses, please help to see what could be the cause, thank you ~ ~



  • Related