Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

Bash script Ping check utility to do continuous check and result save

echo
echo -e "Enter host ip: c"
read -r usrip
echo -e "Enter result file name: c"
read -r resdump
echo
touch /tmp/$resdump
echo "" > /tmp/$resdump
echo "========== Detail result for $usrip in /tmp/$resdump =========="
echo

until ping $usrip -c 3 >> /tmp/$resdump
do
        echo "Host $usrip is down."
        sleep 1
done
echo
echo "Host $usrip is up."
echo
Comment

PREVIOUS NEXT
Code Example
Shell :: composer install repo from tar 
Shell :: How to view unit file content with systemctl command 
Shell :: how to schedule a system reboot with shutdown command 
Shell :: Bash script general template to generate script format 
Shell :: bash merge directories 
Shell :: haskell run prelude 
Shell :: remove file kali 
Shell :: Screen casting to smart screen (DLNA) from ubuntu 
Shell :: remove entry in iptables 
Shell :: Save Resources in K8s, Delete Failed Pods 
Shell :: print the content of file according to the size of line 
Shell :: create multiple files on Linux in sequence through the terminal 
Shell :: git update submodule to latest 
Shell :: install vue-router for vue 2 
Shell :: docker linux install 
Shell :: github clone 
Shell :: fatal error: hiredis.h: aucun fichier ou dossier de ce type 
Shell :: add existing project on github 
Shell :: nextcloud .step file 
Shell :: zip file in terminal 
Shell :: fatal: unable to access error setting certificate verify locations ca-bundle.crt CApath: none 
Shell :: split command in linux 
Shell :: print the current folder path. 
Shell :: enter a number using RANDOM in shell scripting 
Shell :: cloning gist 
Shell :: How to Loop through Array Elements 
Shell :: salt master hot switch debug 
Shell :: run task in background ec2 
Shell :: curl download with rate limit 
Shell :: .htaccess when deploying 
ADD CONTENT
Topic
Content
Source link
Name
1+4 =