Friday, September 11, 2015

OM: Your profile option does not allow automatic numbering e-Commerce Gateway

e-Commerce Gateway Inbound need the Profile Option ‘Sequential Numbering’ needs to be set
at the application and responsibility level to be able to generate order numbers in Order Management"

 

Thursday, September 3, 2015

Check FTP/SFTP status in Shell script

Status of FTP / SFTP can be check with below code in the shell script


2>&1 -- This is going to redirect stderr to stdout


result=`ftp -nv 111.111.111.111 << EOF 2>&1
user $USER $PASSWD
put file.txt
bye
EOF`

ctr=`echo "$result" | grep "226 Transfer complete" | wc -l`

#for error check, check the return string as it's different for FTP and SFTP

err_ctr=`echo "$result" | grep "Couldn't read packet" | wc -l`


if [ $ctr -gt 0 ]
then
echo "File Transfer successful"
elif [ $err_ctr -gt 0 ]
then
echo "connection failure"
fi