Try it out:
./get-ip.sh foo device-list lease-list- When a device is listed twice, the first hit in the device list is checked.
Demo:./get-ip.sh foobar device-list lease-list
- TODO: check all listed devices and return first device with lease or exit with 1
- When no device is given as argument, the first device is checked.
Demo:./get-ip.sh "" device-list lease-list- TODO: check all listed devices and return first device with lease or exit with 1
- When a device doesn't have a lease, the script exits with 1.
Demo:./get-ip.sh bar device-list lease-list
- When a device is not listed, the script exits with 1.
Demo:./get-ip.sh notlisted device-list lease-list