Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for I in 1 2 3 4 5
- do
- statements1 #Executed for all values of ''I'', up to a disaster-condition if any.
- statements2 if (disaster-condition)
- then
- break #Abandon the loop.
- fi
- statements3 #While good and, no disaster-condition.
- done
- #!/bin/bash
- for file in /etc/*
- do
- if [ "${file}" == "/etc/resolv.conf" ]
- then
- countNameservers=$(grep -c nameserver /etc/resolv.conf)
- echo "Total ${countNameservers} nameservers defined in ${file}"
- break
- fi
- done
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement