Question: Fill in the blanks A-G The following shell script is used to check if the input IP address is invalid or not. rs = 1

 Fill in the blanks A-G The following shell script is used

Fill in the blanks A-G

The following shell script is used to check if the input IP address is invalid or not. rs = 1 while [$rs -gt 0]; do clear echo -n "Please input the ip: " read ip #use expr to check if the input IP address follows the IP address pattern. iSIP = ____ A. ____ if [____ B. ____ 0]; then # replace each dot by a space in string ip = ____ C. ____ is valid = 0; # loop over the words in string ip for n in ____ D. ____; do if [____ E. ____ -o $n -lt 0]; then echo "ERROR: The number of the IP should not be greater than 255 and less than 0" ____ F. ____ break; fi done if [____ G. ____]; then echo " -----This is a valid IP -----" fi else echo "ERROR: The IP format you input is wrong, the format should be like 192. 168. 100.1" fi echo echo -n "Press 0 to exit and other numbers to continue ellipsis" read rs done The following shell script is used to check if the input IP address is invalid or not. rs = 1 while [$rs -gt 0]; do clear echo -n "Please input the ip: " read ip #use expr to check if the input IP address follows the IP address pattern. iSIP = ____ A. ____ if [____ B. ____ 0]; then # replace each dot by a space in string ip = ____ C. ____ is valid = 0; # loop over the words in string ip for n in ____ D. ____; do if [____ E. ____ -o $n -lt 0]; then echo "ERROR: The number of the IP should not be greater than 255 and less than 0" ____ F. ____ break; fi done if [____ G. ____]; then echo " -----This is a valid IP -----" fi else echo "ERROR: The IP format you input is wrong, the format should be like 192. 168. 100.1" fi echo echo -n "Press 0 to exit and other numbers to continue ellipsis" read rs done

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!