Finding an IP address is valid or not.
In Linux 5, instead of finding IP is valid or not thru script, we can just execute a command to find. This helps to decrease number of lines we write to find its validity.
If you provide correct IP, the return code will be zero. If a not-a-valid IP provided, then the return value will be 1
# ipcalc -c 10.10.10.10
# echo $?
0
# ipcalc -c 10.10.10.1011
ipcalc: bad IPv4 address: 10.10.10.1011
# echo $?
1