Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

check if internet is available shell script

test=google.com
if nc -zw1 $test 443 && echo |openssl s_client -connect $test:443 2>&1 |awk '
  handshake && $1 == "Verification" { if ($2=="OK") exit; exit 1 }
  $1 $2 == "SSLhandshake" { handshake = 1 }'
then
  echo "we have connectivity"
fi
Comment

PREVIOUS NEXT
Code Example
Shell :: clear the log folder in var linux to a max file of 500M 
Shell :: fix mp3 file 
Shell :: bash how to find all pdf file in subdir and copy 
Shell :: how to install cv2 using pip 
Shell :: Configure NFS Write Performance 
Shell :: uninstall peazip linux 
Shell :: print star 
Shell :: Ubuntu system specificaiton 
Shell :: command to start terminal linux 
Shell :: nginx error ~/Library/LaunchAgents/homebrew.mxcl.nginx.plist 
Shell :: How to push the code in a perticular branch 
Shell :: centos show volume usage 
Shell :: install specific version of npm package sandbox 
Shell :: Removing Watermark From Video File With FFMPEG 
Shell :: fixing system permission issues in ubuntu 
Shell :: linux copy files with specific ending 
Shell :: bashrc setup "android" example 
Shell :: how to boot pendrive with ventoy in linux 
Shell :: run camunda in linux mint 
Shell :: clear files in storage bucket 
Shell :: How to create a file with a given size full of random characters in Linux? 
Shell :: git expo init 
Shell :: git replace parent 
Shell :: to remember all commands typed in multiple terminal 
Shell :: git pelak 
Shell :: +dh_dwz returned exit code 1 
Shell :: how to make a text in batch 
Shell :: how to change the terminal start in directory 
Shell :: bash for loop with decimals 
Shell :: start automount daemon aix 
ADD CONTENT
Topic
Content
Source link
Name
8+5 =