>/dev/null if [ $? -eq 0 ] then echo "Able to reach PC!" else echo " Not able to check PC!" fi"> >/dev/null if [ $? -eq 0 ] then echo "Able to reach PC!" else echo " Not able to check PC!" fi">
Download presentation
Presentation is loading. Please wait.
Published byAlexina Skinner Modified over 8 years ago
1
Experiment No. 13 Presented by, Mr. Satish Pise
2
Write a shell script which checks disk space and store the value to the variable and display it. #!/bin/sh #Retrive disk space info df=`df -Pl | grep "^/dev" | awk '{print $5, $6}' | sed "s/%//"` #Reference: df echo “$df”df
3
Shell Script to check connectivity of HOST PC #!/bin/sh # Ping a standard website with output suppressed, if ping completes then display success else failure echo "Checking PC connectivity..." ping -c 5 $1>>/dev/null if [ $? -eq 0 ] then echo "Able to reach PC!" else echo " Not able to check PC!" fi
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.