Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

how to check if ip is up bash script

#!/bin/bash
IP='192.168.1.1'
fping -c1 -t300 $IP 2>/dev/null 1>/dev/null
if [ "$?" = 0 ]
then
  echo "Host found"
else
  echo "Host not found"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: sshpass mac os x brew 
Shell :: office 2016 activation crack 
Shell :: how to install postgresql in manjaro 
Shell :: transfer files to cluster 
Shell :: shebang 
Shell :: how to remove software from ubuntu 
Shell :: what process consuming RAM 
Shell :: copy ssh-keygen, copy ssh key, copy ssh public key, copy ssh key 
Shell :: shell hide tab 
Shell :: count number of files linux 
Shell :: install snapd ubuntu 
Shell :: docker no sudo 
Shell :: upload new repo to git 
Shell :: install xfce 
Shell :: install chromedriver linux command line 
Shell :: angular cli generate new module 
Shell :: E: Unable to locate package libboost-signals-dev 
Shell :: stash untracked files 
Shell :: find current working directory bash 
Shell :: git push command line 
Shell :: sed get substring between two characters 
Shell :: stop git 
Shell :: kubectl restart deployment 
Shell :: compress video ffmpeg 
Shell :: untar gzip file 
Shell :: uninstall dependencies npm 
Shell :: xlsx Module ../../xlsx/types has no exported member IProperties. Did you mean Properties? 
Shell :: install dirsearch 
Shell :: cannot import urlencode from werkzeug 
Shell :: system program error detected ubuntu 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =