#!/usr/local/bin/tcsh # User on the host machine set USER="shke42" #bastion host (Julius) set host="seres" # target machine to be pinged set target="10.207.41.205" #file name to store the ping details set OUT="status.txt" #ping file path on the host machine set pingpath="/usr/sbin" # remote loging to host and ping the target machine ssh $USER@$host ${pingpath}/ping $target >$OUT sleep 2 exit