Show delegated ipv6 prefix at command line in OpenWRT
You may want to use the jq program to parse the output (available as package in OpenWRT).
Furthermore, if you know that the interface exists, you can call the underlying
ubus command directly, saving the overhead for the sanity checks done by
ubus call network.interface.wan_6 status | jq -r '.["ipv6-prefix"].address'
wan_6 (with underscore) is the name of the automatically generated interface for ipv6. If you have a manually created alias, the name
wan6 may apply.