Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ssh HOSTNAME "run_command with arguments"
- #!/bin/bash
- host=my-server.biz
- check="/opt/path/to/check"
- list=`ssh $host "ls $check"`
- evil=`echo -e "$list"|grep -c "evil"`
- if [ $evil -eq 0 ]; then
- echo "all is well"
- else
- echo "the end is nigh"
- fi
Add Comment
Please, Sign In to add comment