```
$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever 2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1460 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 42:01:0a:80:00:06 brd ff:ff:ff:ff:ff:ff
    inet 10.128.0.6/32 brd 10.128.0.6 scope global noprefixroute dynamic eth0
       valid_lft 2327sec preferred_lft 2327sec
    inet6 fe80::4001:aff:fe80:6/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

```

I have tried the command below but I would want to replace the last octet with "0"

```
ip a | grep ": eth0" -A 2 |  grep inet | awk '{print $2}'
10.128.0.6/32

```

expected output

> 
> 10.128.0.0/32
> 
> 
> 

**Note:-**
ip address the last octet is more than one digit, for example, the last octet could be of a minimum of one digit and a maximum of three 

```
10.128.0.6
10.128.0.16
10.128.0.116

```

so basically we need to replace "0" with the string between "\"