Fetching particular concurrent request out file remotely

This script fetch & transfer the specific concurrent request log file to remote location.

$ vi Connout.sh

cat /dev/null > /usr/tmp/ftp.log

cat /dev/null > /usr/tmp/ftp1.log

echo “Enter Concurrent program Request Id”

read Request_id

ftp  –n  ***.***.***.*** <<END_SCRIPT >/usr/tmp/ftp.log        ———-Add concurrent server IP

quote USER ******                                                                                 ———-Add ftp user name

quote PASS ******                                                                                  ———- Add ftp user password

cd $APPLCSF/out/

get o$Request_id.out

bye

END_SCRIPT

cat /usr/tmp/ftp.log|grep “No such” >/usr/tmp/ftp1.log

a=$?

if [ $a -eq 0 ]

then

echo “Enter Valid Request Id”

else

echo “File Transfered”

exit 1

fi

exit 0

To Run script:

$sh Connout.sh

Request_id ———–Enter specific concurrent request id to fetch.

Check the outfile in pwd.

Recent Posts