In part of the script that I'm working on, I want to validate that the inputted IP address is in the correct format. I want to make a loop while the input format is NOT correct. The following works for a loop while the format IS correct.
while [[ $range =~ ^[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3} ]]
do
How can I turn this around to say DOES NOT fit the format. I was hoping !=~
would work, but I'm getting a syntax error.