I'm trying to change the last digits of the IP address that I stored as a variable:ip=$(ifconfig eth0 | grep inet addr | awk -F: '{print $2} | awk '{print $1}')The output would be 192.168.0.1, but what I'm trying to do is to set the variable with a different last octet such as 192.168.0.2
How to change the last IP digits on Linux command line
linux;networking