Advertisement
Guest User

Untitled

a guest
May 31st, 2016
55
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. #!/bin/ksh
  2. error_ftp ()
  3. {
  4.  
  5. ERROR_CONNECTION=`grep -c "unknown host" $1`
  6.  
  7.  
  8. HOW_PUT=`grep -c "put " $0`
  9. HOW_PUT=`expr $HOW_PUT- 1`
  10. echo $HOW_PUT
  11.  
  12.  
  13. HOW_OK=`grep -c "226 F" $1`
  14. echo $HOW_OK
  15.  
  16. if [ $ERROR_CONNECTION -eq 0 ] && [ $HOW_PUT-eq $HOW_OK]
  17. then
  18. echo " " >> $PATH_LOG/file_log
  19. echo " END SFTP OK"
  20. echo " END SFTP OK" >> $PATH_LOG/file_log
  21. else
  22. TP_ERROR=` expr $TP_ERROR + 2`
  23. echo " ERROR SFTP.." >> $PATH_LOG/file_log
  24.  
  25. fi
  26. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement