>/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">

Presentation is loading. Please wait.

Presentation is loading. Please wait.

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.

Similar presentations


Presentation on theme: "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."— Presentation transcript:

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


Download ppt "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."

Similar presentations


Ads by Google