13

Getting error

view full story
linux-howto

http://www.unix.com – Trying to check the SFTP status but if & else condition not working Please help me #!/bin/bash DATE=`date +%Y-%m-%d:::%H:%M` >/tmp/common.log Log=`grep quit /tmp/common.log | awk '{print $2}'` echo "Starting to sftp...." >> /tmp/common.log { sftp [email protected] << EOF >> /tmp/common.log quit >> /tmp/common.log EOF } if [ "$Log" == "quit" ] then echo "SFTP Succsfully" else echo "SFTP unsucessfully :Please check" fi (HowTos)