This will first disable IPv6 for Wi-Fi then go through all Ethernet hardware and disable the IPv6
networksetup -setv6off Wi-Fi networksetup -listallnetworkservices | sed "1 d" | grep "Ethernet" | while read output ;do networksetup -setv6off "$output";done
Similar to before this will first enable IPv6 for Wi-Fi then go through all Ethernet hardware and enable the IPv6
networksetup -setv6automatic Wi-Fi networksetup -listallnetworkservices | sed "1 d" | grep "Ethernet" | while read output ;do networksetup -setv6automatic "$output";done