Advertisement
Guest User

Untitled

a guest
Jul 19th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. #! /bin/bash
  2.  
  3. exit=0
  4. # if ssh root@spottedcow-sms.us.cray.com "lsmod | grep 'lnet'"; then
  5. if "find . -name 'fruit.txt' | grep 'Apple'"; then
  6. echo "Success!"
  7. exit $?
  8. else
  9. exit=$?
  10. echo "Exit = $exit"
  11. if [ $exit -ne 0 ]; then
  12. if [ $exit -eq 255 ]; then
  13. echo "SSH error, exit=$exit"
  14. exit $exit
  15. fi
  16. if [ $exit -eq 1 ]; then
  17. echo "Can't find Apple, exit=$exit"
  18. exit $exit
  19. fi
  20. fi
  21. fi
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement