Experiment No. 13 Presented by, Mr. Satish Pise
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
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