Suppose that, there is a sub directory "data" in current directory.
Inside this there are JSON files according to the following:
\0
Filename schema and pattern: name.json (name means "hostname")
Such a file contains data according to the following format:
[
{
"name": "eno1",
"ipv4": "10.0.0.254",
"netmask": 24
},
{
"name": "eno2",
"ipv4": "172.16.4.129",
"netmask": 25
},
{
"name": "eno3",
"ipv4": "192.168.2.1",
"netmask": 25
},
{
"name": "turnd",
"ipv4": "10.10.10.1",
"netmask": 32
}
]
Write a shell script that determine the least netmask value is available in the files.