Looking at IOS / IOS XE v15.x+ devices and trying to figure out a command that helps to understand whether it is an L2 or L3 device.
There are various options but those are not the most optimum ones like checking if the device supports vlans or lacp and taking a judgment over it. I am looking for a command that tells me directly about it being an l2/l3 switch/router from Cisco IOS.