Guest User

Untitled

a guest
Dec 15th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. ssh HOSTNAME "run_command with arguments"
  2.  
  3. #!/bin/bash
  4. host=my-server.biz
  5. check="/opt/path/to/check"
  6. list=`ssh $host "ls $check"`
  7. evil=`echo -e "$list"|grep -c "evil"`
  8. if [ $evil -eq 0 ]; then
  9. echo "all is well"
  10. else
  11. echo "the end is nigh"
  12. fi
Add Comment
Please, Sign In to add comment