I'm fairly new to unix scripting and right now I'm modifying this existing FTP line of code found below. I need it to automatically insert the password after accessing a specific bridge server. After successful input of password, the script will automatically send and acknowledgment file ($acknFile) to that bridge server.
I have read different articles and forums and a lot of them suggests on using Expect as a solution. But I was advised that we just need to use whatever module we have and unfortunately, Expect is not included. Will highly appreciate any input from you guys and will try to understand how it works.
See line of code below:
if grep -q "$Filename" "$FilenameDirectory"
then
echo "File exists." >> $acknFile
scp - v $acknFile "$BridgeServer"
else
echo "File does not exists."
fi